Fix the build

This commit is contained in:
Jeffrey Pfau 2014-04-03 00:00:06 -07:00
parent ecb1939ff1
commit b8ecabbaa9
2 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include "gdb-stub.h"
#include <errno.h>
#include <signal.h>
enum GDBError {
GDB_NO_ERROR = 0x00,

View File

@ -191,13 +191,17 @@ static void _GBASDLRunloop(struct GBAThread* context, struct GLSoftwareRenderer*
#endif
while (SDL_PollEvent(&event)) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
int fullscreen = renderer->events.fullscreen;
#endif
GBASDLHandleEvent(context, &renderer->events, &event);
#if SDL_VERSION_ATLEAST(2, 0, 0)
// Event handling can change the size of the screen
if (renderer->events.fullscreen != fullscreen) {
SDL_GetWindowSize(renderer->window, &renderer->viewportWidth, &renderer->viewportHeight);
glViewport(0, 0, renderer->viewportWidth, renderer->viewportHeight);
}
#endif
}
}
}