Browse Source

Fixed SDL_GetDisplayIndex()

Sam Lantinga 7 months ago
parent
commit
1a007ab88d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/video/SDL_video.c

+ 2 - 1
src/video/SDL_video.c

@@ -950,7 +950,8 @@ int SDL_GetDisplayIndex(SDL_DisplayID displayID)
     int display_index;
 
     if (!_this) {
-        return SDL_UninitializedVideo();
+        SDL_UninitializedVideo();
+        return -1;
     }
 
     for (display_index = 0; display_index < _this->num_displays; ++display_index) {