SDL: Fix SDL 1.2 build

This commit is contained in:
Jeffrey Pfau 2014-11-05 03:42:19 -08:00
parent 9cc43cd883
commit d5b8fdf81c
3 changed files with 2 additions and 3 deletions

View File

@ -64,6 +64,7 @@ int main(int argc, char** argv) {
renderer.events.fullscreen = opts.fullscreen; renderer.events.fullscreen = opts.fullscreen;
renderer.events.windowUpdated = 0; renderer.events.windowUpdated = 0;
#endif #endif
renderer.ratio = graphicsOpts.multiplier;
if (!_GBASDLInit(&renderer)) { if (!_GBASDLInit(&renderer)) {
freeArguments(&args); freeArguments(&args);

View File

@ -25,12 +25,11 @@ struct SDLSoftwareRenderer {
SDL_Texture* tex; SDL_Texture* tex;
SDL_Renderer* sdlRenderer; SDL_Renderer* sdlRenderer;
#endif #endif
#else
int ratio;
#endif #endif
int viewportWidth; int viewportWidth;
int viewportHeight; int viewportHeight;
int ratio;
#ifdef BUILD_GL #ifdef BUILD_GL
GLuint tex; GLuint tex;

View File

@ -37,7 +37,6 @@ void GBASDLInit(struct SDLSoftwareRenderer* renderer) {
SDL_Surface* surface = SDL_GetVideoSurface(); SDL_Surface* surface = SDL_GetVideoSurface();
SDL_LockSurface(surface); SDL_LockSurface(surface);
renderer->ratio = graphicsOpts.multiplier;
if (renderer->ratio == 1) { if (renderer->ratio == 1) {
renderer->d.outputBuffer = surface->pixels; renderer->d.outputBuffer = surface->pixels;
#ifdef COLOR_16_BIT #ifdef COLOR_16_BIT