Commit d4140ca47320c3c2762aed60f03953105eeee0c6

Philipp Wiesemann 2016-05-20T22:15:58

Windows: Fixed missing error message if SDL_GetDisplayDPI() failed.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/windows/SDL_windowsmodes.c b/src/video/windows/SDL_windowsmodes.c
index 1c1a0f6..8e80fa6 100644
--- a/src/video/windows/SDL_windowsmodes.c
+++ b/src/video/windows/SDL_windowsmodes.c
@@ -342,7 +342,7 @@ WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi,
         *vdpi = data->VertDPI;
     }
 
-    return data->DiagDPI != 0.0f ? 0 : -1;
+    return data->DiagDPI != 0.0f ? 0 : SDL_SetError("Couldn't get DPI");
 }
 
 int