Turns out I'm the stupid one
This commit is contained in:
parent
0ed19894ba
commit
2e8d3441ed
1 changed files with 1 additions and 7 deletions
|
@ -37,8 +37,6 @@ static Backend_Surface *framebuffer;
|
||||||
|
|
||||||
static Backend_Surface *surf[SURFACE_ID_MAX];
|
static Backend_Surface *surf[SURFACE_ID_MAX];
|
||||||
|
|
||||||
static SDL_PixelFormat *rgb24_pixel_format; // Needed because SDL2 is stupid
|
|
||||||
|
|
||||||
static FontObject *font;
|
static FontObject *font;
|
||||||
|
|
||||||
// This doesn't exist in the Linux port, so none of these symbol names are accurate
|
// This doesn't exist in the Linux port, so none of these symbol names are accurate
|
||||||
|
@ -122,8 +120,6 @@ BOOL StartDirectDraw(SDL_Window *window, int lMagnification)
|
||||||
if (framebuffer == NULL)
|
if (framebuffer == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
rgb24_pixel_format = SDL_AllocFormat(SDL_PIXELFORMAT_RGB24);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,8 +139,6 @@ void EndDirectDraw(void)
|
||||||
|
|
||||||
framebuffer = NULL;
|
framebuffer = NULL;
|
||||||
|
|
||||||
SDL_FreeFormat(rgb24_pixel_format);
|
|
||||||
|
|
||||||
Backend_Deinit();
|
Backend_Deinit();
|
||||||
|
|
||||||
memset(surface_metadata, 0, sizeof(surface_metadata));
|
memset(surface_metadata, 0, sizeof(surface_metadata));
|
||||||
|
@ -164,7 +158,7 @@ void ReleaseSurface(SurfaceID s)
|
||||||
|
|
||||||
static BOOL ScaleAndUploadSurface(SDL_Surface *surface, SurfaceID surf_no)
|
static BOOL ScaleAndUploadSurface(SDL_Surface *surface, SurfaceID surf_no)
|
||||||
{
|
{
|
||||||
SDL_Surface *converted_surface = SDL_ConvertSurface(surface, rgb24_pixel_format, 0);
|
SDL_Surface *converted_surface = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_RGB24, 0);
|
||||||
|
|
||||||
SDL_FreeSurface(surface);
|
SDL_FreeSurface(surface);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue