Selaa lähdekoodia

OS2_VideoInit: zero the stSDLDisplay and stSDLDisplayMode variables

Fixes testdisplayinfo.exe crashing in SDL2-2.0.13.  (How it did work before?..)
Ozkan Sezer 4 vuotta sitten
vanhempi
commit
fba32ee21f
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      src/video/os2/SDL_os2video.c

+ 2 - 0
src/video/os2/SDL_os2video.c

@@ -1555,6 +1555,8 @@ static int OS2_VideoInit(_THIS)
       return SDL_SetError( "Video mode query failed." );
     }
 
+    SDL_zero(stSDLDisplay); SDL_zero(stSDLDisplayMode);
+
     stSDLDisplayMode.format = _getSDLPixelFormat( stVOInfo.ulBPP,
                                                   stVOInfo.fccColorEncoding );
     stSDLDisplayMode.w = stVOInfo.ulHorizResolution;