mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix SDL 1.2 build
This commit is contained in:
parent
9cc43cd883
commit
d5b8fdf81c
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue