Selaa lähdekoodia

Check the return value of SDL_EVDEV_Init()

Sam Lantinga 8 vuotta sitten
vanhempi
commit
c16dd74f3b
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/video/raspberry/SDL_rpivideo.c

+ 3 - 1
src/video/raspberry/SDL_rpivideo.c

@@ -183,7 +183,9 @@ RPI_VideoInit(_THIS)
     SDL_AddVideoDisplay(&display);
 
 #ifdef SDL_INPUT_LINUXEV    
-    SDL_EVDEV_Init();
+    if (SDL_EVDEV_Init() < 0) {
+        return -1;
+    }
 #endif    
     
     RPI_InitMouse(_this);