More cleanup

This commit is contained in:
Clownacy 2020-04-01 16:27:55 +01:00
parent ff70664604
commit 49f7887930
5 changed files with 21 additions and 9 deletions

View file

@ -12,7 +12,7 @@
#include "../../Profile.h"
#include "../../Resource.h"
extern SDL_Window *window;
SDL_Window *window;
BOOL bActive = TRUE;

View file

@ -20,7 +20,8 @@ typedef struct Backend_Glyph
SDL_Surface *sdlsurface;
} Backend_Glyph;
static SDL_Window *window;
extern SDL_Window *window;
static SDL_Surface *window_sdlsurface;
static Backend_Surface framebuffer;
@ -248,8 +249,11 @@ void Backend_HandleRenderTargetLoss(void)
// No problem for us
}
void Backend_HandleWindowResize(void)
void Backend_HandleWindowResize(unsigned int width, unsigned int height)
{
(void)width;
(void)height;
// https://wiki.libsdl.org/SDL_GetWindowSurface
// We need to fetch a new surface pointer
window_sdlsurface = SDL_GetWindowSurface(window);

View file

@ -11,7 +11,7 @@
#include "../../WindowsWrapper.h"
#inclide "../Platform.h"
#include "../Platform.h"
#include "../../Draw.h"
#include "../../Ending.h"
#include "../../MapName.h"
@ -36,7 +36,8 @@ typedef struct Backend_Glyph
unsigned int height;
} Backend_Glyph;
static SDL_Window *window;
extern SDL_Window *window;
static SDL_Renderer *renderer;
static Backend_Surface framebuffer;
@ -420,7 +421,10 @@ void Backend_HandleRenderTargetLoss(void)
surface->lost = TRUE;
}
void Backend_HandleWindowResize(void)
void Backend_HandleWindowResize(unsigned int width, unsigned int height)
{
(void)width;
(void)height;
// No problem for us
}

View file

@ -28,7 +28,8 @@ typedef struct Backend_Glyph
unsigned int height;
} Backend_Glyph;
static SDL_Window *window;
extern SDL_Window *window;
static SDL_Surface *window_sdlsurface;
static SDL_Surface *framebuffer_sdlsurface;
static Backend_Surface framebuffer;
@ -369,8 +370,11 @@ void Backend_HandleRenderTargetLoss(void)
// No problem for us
}
void Backend_HandleWindowResize(void)
void Backend_HandleWindowResize(unsigned int width, unsigned int height)
{
(void)width;
(void)height;
// https://wiki.libsdl.org/SDL_GetWindowSurface
// We need to fetch a new surface pointer
window_sdlsurface = SDL_GetWindowSurface(window);

View file

@ -14,7 +14,7 @@
#include "../Platform.h"
#include "../../Resource.h"
SDL_Window *window;
extern SDL_Window *window;
static SDL_GLContext context;