Skip to content

Commit 362ac12

Browse files
authored
Fix init_display_mode
1 parent cc46578 commit 362ac12

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/video/ogc/SDL_ogcvideo.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static const GXRModeObj *s_pal_modes[] = {
8787
static int OGC_VideoInit(_THIS);
8888
static void OGC_VideoQuit(_THIS);
8989

90-
static void init_display_mode(SDL_DisplayMode *mode, const GXRModeObj *vmode, int width = NULL)
90+
static void init_display_mode(SDL_DisplayMode *mode, const GXRModeObj *vmode, int width)
9191
{
9292
u32 format = VI_FORMAT_FROM_MODE(vmode->viTVMode);
9393

@@ -144,7 +144,7 @@ static void add_supported_modes(SDL_VideoDisplay *display, u32 tv_format)
144144
* take care of the horizontal scale for us. */
145145
memcpy(&s_mode320, gx_modes[0], sizeof(s_mode320));
146146
s_mode320.fbWidth = 320;
147-
init_display_mode(&mode, &s_mode320);
147+
init_display_mode(&mode, &s_mode320, s_mode320.fbWidth);
148148
SDL_AddDisplayMode(display, &mode);
149149

150150
// libogc uses 640 for the viWidth, but this does not work well for Widescreen
@@ -179,7 +179,7 @@ static void add_supported_modes(SDL_VideoDisplay *display, u32 tv_format)
179179

180180
/* Now add all the "standard" modes from libogc */
181181
while (*gx_modes) {
182-
init_display_mode(&mode, *gx_modes);
182+
init_display_mode(&mode, *gx_modes, *gx_modes->fbWidth);
183183
SDL_AddDisplayMode(display, &mode);
184184
gx_modes++;
185185
}
@@ -325,7 +325,7 @@ int OGC_VideoInit(_THIS)
325325

326326
GX_Flush();
327327

328-
init_display_mode(&mode, vmode);
328+
init_display_mode(&mode, vmode, vmode->fbWidth);
329329
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
330330
return -1;
331331
}

0 commit comments

Comments
 (0)