Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
vitaquake3
Commits
0cfd223e
Commit
0cfd223e
authored
Mar 17, 2018
by
Rinnegatamante
Browse files
Added lower resolutions support.
parent
5294a6b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
code/psp2/psp2_glimp.c
View file @
0cfd223e
...
...
@@ -81,12 +81,45 @@ float *gVertexBuffer;
float
*
gColorBuffer
;
float
*
gTexCoordBuffer
;
uint8_t
inited
=
0
;
typedef
struct
vidmode_s
{
const
char
*
description
;
int
width
,
height
;
float
pixelAspect
;
// pixel width / height
}
vidmode_t
;
extern
vidmode_t
r_vidModes
[];
uint32_t
cur_width
;
void
GLimp_Init
(
qboolean
coreContext
)
{
if
(
r_mode
->
integer
<
0
)
r_mode
->
integer
=
3
;
glConfig
.
vidWidth
=
r_vidModes
[
r_mode
->
integer
].
width
;
glConfig
.
vidHeight
=
r_vidModes
[
r_mode
->
integer
].
height
;
glConfig
.
colorBits
=
32
;
glConfig
.
depthBits
=
32
;
glConfig
.
stencilBits
=
8
;
glConfig
.
displayFrequency
=
60
;
glConfig
.
stereoEnabled
=
qfalse
;
glConfig
.
driverType
=
GLDRV_ICD
;
glConfig
.
hardwareType
=
GLHW_GENERIC
;
glConfig
.
deviceSupportsGamma
=
qfalse
;
glConfig
.
textureCompression
=
TC_NONE
;
glConfig
.
textureEnvAddAvailable
=
qfalse
;
glConfig
.
windowAspect
=
((
float
)
r_vidModes
[
r_mode
->
integer
].
width
)
/
((
float
)
r_vidModes
[
r_mode
->
integer
].
height
);
glConfig
.
isFullscreen
=
qtrue
;
if
(
!
inited
){
vglInit
(
0x800000
);
vglInit
Extended
(
0x800000
,
glConfig
.
vidWidth
,
glConfig
.
vidHeight
);
vglUseVram
(
GL_TRUE
);
inited
=
1
;
cur_width
=
glConfig
.
vidWidth
;
}
else
if
(
glConfig
.
vidWidth
!=
cur_width
){
// Changed resolution in game, restarting the game
sceAppMgrLoadExec
(
"app0:/eboot.bin"
,
NULL
,
NULL
);
}
vglStartRendering
();
int
i
;
...
...
@@ -100,22 +133,6 @@ void GLimp_Init( qboolean coreContext)
gColorBuffer
=
(
float
*
)
malloc
(
sizeof
(
float
)
*
VERTEXARRAYSIZE
);
gTexCoordBuffer
=
(
float
*
)
malloc
(
sizeof
(
float
)
*
VERTEXARRAYSIZE
);
glConfig
.
vidWidth
=
960
;
glConfig
.
vidHeight
=
544
;
glConfig
.
colorBits
=
32
;
glConfig
.
depthBits
=
32
;
glConfig
.
stencilBits
=
8
;
glConfig
.
displayFrequency
=
60
;
glConfig
.
stereoEnabled
=
qfalse
;
glConfig
.
driverType
=
GLDRV_ICD
;
glConfig
.
hardwareType
=
GLHW_GENERIC
;
glConfig
.
deviceSupportsGamma
=
qfalse
;
glConfig
.
textureCompression
=
TC_NONE
;
glConfig
.
textureEnvAddAvailable
=
qfalse
;
glConfig
.
windowAspect
=
960
.
0
f
/
544
.
0
f
;
glConfig
.
isFullscreen
=
qtrue
;
strncpy
(
glConfig
.
vendor_string
,
glGetString
(
GL_VENDOR
),
sizeof
(
glConfig
.
vendor_string
));
strncpy
(
glConfig
.
renderer_string
,
glGetString
(
GL_RENDERER
),
sizeof
(
glConfig
.
renderer_string
));
strncpy
(
glConfig
.
version_string
,
glGetString
(
GL_VERSION
),
sizeof
(
glConfig
.
version_string
));
...
...
code/psp2/sys_main.c
View file @
0cfd223e
...
...
@@ -194,10 +194,6 @@ void Sys_Init(void) {
Cmd_AddCommand
(
"in_restart"
,
Sys_In_Restart_f
);
Cvar_Set
(
"arch"
,
OS_STRING
" "
ARCH_STRING
);
Cvar_Set
(
"username"
,
Sys_GetCurrentUser
());
Cvar_Set
(
"r_mode"
,
"3"
);
Cvar_Set
(
"r_customheight"
,
"544"
);
Cvar_Set
(
"r_customwidth"
,
"960"
);
}
/*
...
...
code/renderergl1/tr_init.c
View file @
0cfd223e
...
...
@@ -271,18 +271,18 @@ typedef struct vidmode_s
vidmode_t
r_vidModes
[]
=
{
{
"Mode 0:
32
0x2
40
"
,
32
0
,
2
40
,
1
},
{
"Mode 1: 4
0
0x3
00
"
,
4
0
0
,
3
00
,
1
},
{
"Mode 2:
512x384"
,
512
,
384
,
1
},
{
"Mode 0:
48
0x2
72
"
,
48
0
,
2
72
,
1
},
{
"Mode 1:
6
40x3
68
"
,
6
40
,
3
68
,
1
},
{
"Mode 2:
720x408"
,
720
,
408
,
1
},
{
"Mode 3: 960x544"
,
960
,
544
,
1
},
{
"Mode 4:
800x600
"
,
80
0
,
600
,
1
},
{
"Mode 5: 960x
720
"
,
960
,
720
,
1
},
{
"Mode 6:
1024x768"
,
1024
,
768
,
1
},
{
"Mode 7:
1152x864"
,
1152
,
86
4
,
1
},
{
"Mode 8:
1280x1024"
,
1280
,
102
4
,
1
},
{
"Mode 9:
1600x1200"
,
1600
,
1200
,
1
},
{
"Mode 10:
2048x1536"
,
2048
,
1536
,
1
},
{
"Mode 11:
856x480 (wide)"
,
856
,
480
,
1
}
{
"Mode 4:
960x544
"
,
96
0
,
544
,
1
},
{
"Mode 5: 960x
544
"
,
960
,
544
,
1
},
{
"Mode 6:
960x544"
,
960
,
544
,
1
},
{
"Mode 7:
960x544"
,
960
,
54
4
,
1
},
{
"Mode 8:
960x544"
,
960
,
54
4
,
1
},
{
"Mode 9:
960x544"
,
960
,
544
,
1
},
{
"Mode 10:
960x544"
,
960
,
544
,
1
},
{
"Mode 11:
960x544"
,
960
,
544
,
1
}
};
static
int
s_numVidModes
=
ARRAY_LEN
(
r_vidModes
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment