|
|
|
@ -46,6 +46,7 @@ VECTOR aspect_scale = { SCREENWIDTH * ONE / 320, ONE, ONE }; |
|
|
|
|
|
|
|
u_short polyCount; |
|
|
|
u_char enableTexturing = 1; |
|
|
|
u_char enableVsync = 0; |
|
|
|
|
|
|
|
void display_init() |
|
|
|
{ |
|
|
|
@ -104,8 +105,8 @@ void display_reset(int mode, u_char interlaced, u_char widescreen, int *outScree |
|
|
|
if (interlaced) |
|
|
|
{ |
|
|
|
screenHeight <<= 1; |
|
|
|
yOffset <<= 1; |
|
|
|
aspect_scale.vy <<= 1; |
|
|
|
enableVsync = 1; |
|
|
|
|
|
|
|
// Define display environments, interlaced images cover the same area in VRAM |
|
|
|
SetDefDispEnv(&disp[0], 0, 0, SCREENWIDTH, screenHeight); |
|
|
|
@ -119,6 +120,8 @@ void display_reset(int mode, u_char interlaced, u_char widescreen, int *outScree |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
enableVsync = 0; |
|
|
|
|
|
|
|
// Define display environments, first on top and second on bottom |
|
|
|
SetDefDispEnv(&disp[0], 0, 0, SCREENWIDTH, screenHeight); |
|
|
|
SetDefDispEnv(&disp[1], 0, screenHeight, SCREENWIDTH, screenHeight); |
|
|
|
@ -184,9 +187,9 @@ void display_finish() |
|
|
|
// Wait for all drawing to complete |
|
|
|
DrawSync(0); |
|
|
|
|
|
|
|
// Wait for vertical sync to cap the logic to 60fps (or 50 in PAL mode) |
|
|
|
// and prevent screen tearing |
|
|
|
//VSync(0); |
|
|
|
// Wait for vertical sync to cap the logic to 60fps (or 50 in PAL mode) and prevent screen tearing |
|
|
|
if (enableVsync) |
|
|
|
VSync(0); |
|
|
|
|
|
|
|
// Switch pages |
|
|
|
PutDispEnv(&disp[db]); |
|
|
|
|