Browse Source

Adapted Select button input to switch between NTSC and PAL, which is a bit more useful at the moment.

tess_experiment
Nico de Poel 3 years ago
parent
commit
5709d4973c
  1. 9
      display.c
  2. 2
      display.h
  3. 2
      input.c

9
display.c

@ -57,7 +57,7 @@ void display_init()
// Start the display in progressive mode // Start the display in progressive mode
int screenHeight; int screenHeight;
display_reset(0, &screenHeight);
display_reset(GetVideoMode(), 0, &screenHeight);
// Set and enable clear color // Set and enable clear color
setRGB0(&draw[0], 49, 77, 121); setRGB0(&draw[0], 49, 77, 121);
@ -86,10 +86,13 @@ void display_init()
gte_SetGeomScreen(180); // Screen depth for FOV control. Determines the distance of the camera to the near plane. gte_SetGeomScreen(180); // Screen depth for FOV control. Determines the distance of the camera to the near plane.
} }
void display_reset(u_char interlaced, int *outScreenHeight)
void display_reset(int mode, u_char interlaced, int *outScreenHeight)
{ {
if (mode != GetVideoMode())
SetVideoMode(mode);
int screenHeight, yOffset; int screenHeight, yOffset;
if (GetVideoMode() == MODE_NTSC)
if (mode == MODE_NTSC)
{ {
screenHeight = SCREENHEIGHT_NTSC; screenHeight = SCREENHEIGHT_NTSC;
yOffset = (240 - SCREENHEIGHT_NTSC) >> 1; // Vertically center the image for NTSC displays yOffset = (240 - SCREENHEIGHT_NTSC) >> 1; // Vertically center the image for NTSC displays

2
display.h

@ -11,7 +11,7 @@ extern MATRIX vp_matrix;
extern u_long *curOT; extern u_long *curOT;
void display_init(); void display_init();
void display_reset(u_char interlaced, int *outScreenHeight);
void display_reset(int mode, u_char interlaced, int *outScreenHeight);
void display_start(); void display_start();
void display_finish(); void display_finish();

2
input.c

@ -107,7 +107,7 @@ void input_process()
{ {
dispmode_held = 1; dispmode_held = 1;
disp_interlace = !disp_interlace; disp_interlace = !disp_interlace;
display_reset(disp_interlace, NULL);
display_reset(!GetVideoMode(), 0, NULL);
} }
} }
else else

Loading…
Cancel
Save