Skip to content

Commit

Permalink
missed a couple changes on a rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
GPF committed Oct 25, 2024
1 parent 615c485 commit 0d9463f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/video/dreamcast/SDL_dreamcastframebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,22 @@ int SDL_DREAMCAST_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *for
{
SDL_Surface *surface;
int w, h;

SDL_DisplayMode mode;
Uint32 surface_format = mode.format;

/* Free the old framebuffer surface */
SDL_DREAMCAST_DestroyWindowFramebuffer(_this, window);

SDL_GetWindowSizeInPixels(window, &w, &h);

// Retrieve the display mode's format to ensure consistency with the surface creation
SDL_DisplayMode mode;

if (SDL_GetWindowDisplayMode(window, &mode) != 0) {
return SDL_SetError("Failed to get window display mode");
}

// Use the format from the display mode or fallback to the default
Uint32 surface_format = mode.format;

if (surface_format != SDL_PIXELFORMAT_RGB565 &&
surface_format != SDL_PIXELFORMAT_ARGB1555 &&
surface_format != SDL_PIXELFORMAT_RGB888 &&
Expand Down
5 changes: 2 additions & 3 deletions src/video/dreamcast/SDL_dreamcastvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ void SDL_DC_ShowAskHz(SDL_bool value)
void SDL_DC_Default60Hz(SDL_bool value)
{
sdl_dc_default_60hz=value;
}//Custom code for 60Hz
static int sdl_dc_no_ask_60hz=0;
static int sdl_dc_default_60hz=0;
}

/* Initialization/Query functions */
static int DREAMCAST_VideoInit(_THIS);
static void DREAMCAST_VideoQuit(_THIS);
Expand Down

0 comments on commit 0d9463f

Please sign in to comment.