From 88a7e3d5817f9411badbde34a337073e349e0d30 Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Fri, 18 Nov 2016 21:50:13 +0000 Subject: [PATCH] C89 fix for aspect ratio code in SDL_rpivideo.c --- src/video/raspberry/SDL_rpivideo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/video/raspberry/SDL_rpivideo.c b/src/video/raspberry/SDL_rpivideo.c index 3bf301bbd..b03a939ab 100644 --- a/src/video/raspberry/SDL_rpivideo.c +++ b/src/video/raspberry/SDL_rpivideo.c @@ -230,6 +230,10 @@ RPI_CreateWindow(_THIS, SDL_Window * window) DISPMANX_UPDATE_HANDLE_T dispman_update; uint32_t layer = SDL_RPI_VIDEOLAYER; const char *env; + float srcAspect = 1; + float dstAspect = 1; + int factor_x = 0; + int factor_y = 0; /* Disable alpha, otherwise the app looks composed with whatever dispman is showing (X11, console,etc) */ dispman_alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS; @@ -244,11 +248,6 @@ RPI_CreateWindow(_THIS, SDL_Window * window) display = SDL_GetDisplayForWindow(window); displaydata = (SDL_DisplayData *) display->driverdata; - float srcAspect = 1; - float dstAspect = 1; - int factor_x = 0; - int factor_y = 0; - if (hintScale != NULL) scalemode = *hintScale;