Fix SDL1 build

This commit is contained in:
Michael Martin
2020-04-03 23:43:25 -07:00
parent b10c30fde7
commit 31e09def39
2 changed files with 14 additions and 2 deletions
+10
View File
@@ -280,6 +280,16 @@ TFB_GL_InitGraphics (int driver, int flags, int width, int height)
return 0; return 0;
} }
void
TFB_GL_UninitGraphics (void)
{
int i;
for (i = 0; i < TFB_GFX_NUMSCREENS; i++) {
UnInit_Screen (&GL_Screens[i].scaled);
}
}
static void static void
TFB_GL_UploadTransitionScreen (void) TFB_GL_UploadTransitionScreen (void)
{ {
+4 -2
View File
@@ -62,6 +62,8 @@ TFB_PreInit (void)
log_add (log_Fatal, "Could not initialize SDL: %s.", SDL_GetError ()); log_add (log_Fatal, "Could not initialize SDL: %s.", SDL_GetError ());
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
atexit (TFB_PreQuit);
} }
static void static void
@@ -223,9 +225,9 @@ TFB_SupportsHardwareScaling (void)
static SDL_Surface * static SDL_Surface *
Create_Screen (SDL_Surface *templat, int w, int h) Create_Screen (SDL_Surface *templat, int w, int h)
{ {
SDL_Surface *newsurf = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h SDL_Surface *newsurf = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h,
templat->format->BitsPerPixel, templat->format->BitsPerPixel,
templat->format->Rmask, templat->format->GMask, templat->format->Rmask, templat->format->Gmask,
templat->format->Bmask, 0); templat->format->Bmask, 0);
if (newsurf == 0) { if (newsurf == 0) {
log_add (log_Error, "Couldn't create screen buffes: %s", log_add (log_Error, "Couldn't create screen buffes: %s",