Skip to content

Commit

Permalink
if SDL_VIDEO_OPENGL mode enabled, default screen size is 640X480
Browse files Browse the repository at this point in the history
  • Loading branch information
GPF committed Jan 4, 2025
1 parent 569f473 commit f340184
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/video/dreamcast/SDL_dreamcastvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ int DREAMCAST_VideoInit(_THIS) {
int height = 480;
const char *video_mode_hint = SDL_GetHint(SDL_HINT_DC_VIDEO_MODE);
if (video_mode_hint != NULL && strcmp(video_mode_hint, "SDL_DC_TEXTURED_VIDEO") == 0) {
SDL_Log("Initializing SDL_DC_TEXTURED_VIDEO");
width = 320;
height = 240;
}
Expand Down Expand Up @@ -265,21 +266,29 @@ int DREAMCAST_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *

// Determine the appropriate display mode
if (__sdl_dc_is_60hz) {
#ifdef SDL_VIDEO_OPENGL
disp_mode = DM_640x480;
#else
if (mode->w == 320 && mode->h == 240) {
disp_mode = DM_320x240;
} else if (mode->w == 640 && mode->h == 480) {
disp_mode = DM_640x480;
} else if (mode->w == 768 && mode->h == 480) {
disp_mode = DM_768x480;
}
} else {
}
#endif
else {
#ifdef SDL_VIDEO_OPENGL
disp_mode = DM_640x480_PAL_IL;
#else
if (mode->w == 320 && mode->h == 240) {
disp_mode = DM_320x240_PAL;
} else if (mode->w == 640 && mode->h == 480) {
disp_mode = DM_640x480_PAL_IL;
}
}

#endif
if (disp_mode < 0) {
SDL_SetError("Unsupported display mode");
return -1;
Expand Down

0 comments on commit f340184

Please sign in to comment.