static int video_xoffset;
static int video_yoffset;
-static void setFullscreenParameters()
+static void setFullscreenParameters(char *fullscreen_mode_string)
{
struct ScreenModeInfo *fullscreen_mode;
int i;
- fullscreen_mode = get_screen_mode_from_string(setup.fullscreen_mode);
+ fullscreen_mode = get_screen_mode_from_string(fullscreen_mode_string);
if (fullscreen_mode == NULL)
return;
void SDLInitVideoDisplay(void)
{
+ if (!strEqual(setup.system.sdl_videodriver, ARG_DEFAULT))
+ putenv(getStringCat2("SDL_VIDEODRIVER=", setup.system.sdl_videodriver));
+
putenv("SDL_VIDEO_CENTERED=1");
/* initialize SDL video */
if (fullscreen && !video.fullscreen_enabled && video.fullscreen_available)
{
- setFullscreenParameters();
+ setFullscreenParameters(setup.fullscreen_mode);
video_xoffset = fullscreen_xoffset;
video_yoffset = fullscreen_yoffset;
/* do not try it again */
video.fullscreen_available = FALSE;
+
success = FALSE;
}
else
(*backbuffer)->surface = new_surface;
video.fullscreen_enabled = TRUE;
+ video.fullscreen_mode_current = setup.fullscreen_mode;
+
success = TRUE;
}
}
}
void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height,
- int fade_mode, int fade_delay, int post_delay)
+ int fade_mode, int fade_delay, int post_delay,
+ void (*draw_border_function)(void))
{
static boolean initialization_needed = TRUE;
static SDL_Surface *surface_source = NULL;
SDL_SetAlpha(surface_target, SDL_SRCALPHA, alpha_final);
SDL_BlitSurface(surface_target, &src_rect, surface_screen, &dst_rect);
+ if (draw_border_function != NULL)
+ draw_border_function();
+
#if 1
/* only update the region of the screen that is affected from fading */
SDL_UpdateRect(surface_screen, dst_x, dst_y, width, height);