X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=vid_sdl.c;h=9fbe57c655f1feed7985d276087eaa9634041323;hb=6fb644eee19956bee121e1f2430d2b84067dc056;hp=805a45b4a74fd41f3d7aa4c1ed8eabd9f4ea800e;hpb=c5b7dc9addac09cbfab5e592e9b2feea8d7da241;p=xonotic%2Fdarkplaces.git diff --git a/vid_sdl.c b/vid_sdl.c index 805a45b4..9fbe57c6 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -84,7 +84,7 @@ static int win_half_height = 50; static int video_bpp; #if SDL_MAJOR_VERSION == 1 -static SDL_Surface *screen; +static SDL_Surface *video_screen; static int video_flags; #else static SDL_GLContext context; @@ -1154,7 +1154,7 @@ void Sys_SendKeyEvents( void ) vid.width = event.resize.w; vid.height = event.resize.h; if (!vid_isfullscreen) - screen = SDL_SetVideoMode(vid.width, vid.height, video_bpp, video_flags); + video_screen = SDL_SetVideoMode(vid.width, vid.height, video_bpp, video_flags); if (vid_softsurface) { SDL_FreeSurface(vid_softsurface); @@ -2622,15 +2622,15 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode) video_bpp = mode->bitsperpixel; #if SDL_MAJOR_VERSION == 1 video_flags = flags; - screen = VID_WrapSDL_SetVideoMode(mode->width, mode->height, mode->bitsperpixel, flags); - if (screen == NULL) + video_screen = VID_WrapSDL_SetVideoMode(mode->width, mode->height, mode->bitsperpixel, flags); + if (video_screen == NULL) { Con_Printf("Failed to set video mode to %ix%i: %s\n", mode->width, mode->height, SDL_GetError()); VID_Shutdown(); return false; } - mode->width = screen->w; - mode->height = screen->h; + mode->width = video_screen->w; + mode->height = video_screen->h; #else window_flags = windowflags; window = SDL_CreateWindow(gamename, xPos, yPos, mode->width, mode->height, windowflags); @@ -2734,15 +2734,15 @@ static qboolean VID_InitModeSoft(viddef_mode_t *mode) video_bpp = mode->bitsperpixel; #if SDL_MAJOR_VERSION == 1 video_flags = flags; - screen = VID_WrapSDL_SetVideoMode(mode->width, mode->height, mode->bitsperpixel, flags); - if (screen == NULL) + video_screen = VID_WrapSDL_SetVideoMode(mode->width, mode->height, mode->bitsperpixel, flags); + if (video_screen == NULL) { Con_Printf("Failed to set video mode to %ix%i: %s\n", mode->width, mode->height, SDL_GetError()); VID_Shutdown(); return false; } - mode->width = screen->w; - mode->height = screen->h; + mode->width = video_screen->w; + mode->height = video_screen->h; #else window_flags = windowflags; window = SDL_CreateWindow(gamename, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, mode->width, mode->height, windowflags); @@ -2927,8 +2927,8 @@ void VID_Finish (void) #if SDL_MAJOR_VERSION == 1 // if (!r_test.integer) { - SDL_BlitSurface(vid_softsurface, NULL, screen, NULL); - SDL_Flip(screen); + SDL_BlitSurface(vid_softsurface, NULL, video_screen, NULL); + SDL_Flip(video_screen); } #else {