Browse Source

Make sure love.window.getSafeArea is in DPI-scaled units on all platforms.

Alex Szpakowski 6 years ago
parent
commit
f504ace6cd
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/modules/window/sdl/Window.cpp

+ 3 - 1
src/modules/window/sdl/Window.cpp

@@ -850,7 +850,9 @@ Rect Window::getSafeArea() const
 		return love::ios::getSafeArea(window);
 #endif
 
-	return {0, 0, getWidth(), getHeight()};
+	double dw, dh;
+	fromPixels(pixelWidth, pixelHeight, dw, dh);
+	return {0, 0, (int) dw, (int) dh};
 }
 
 bool Window::isOpen() const