瀏覽代碼

fixed mousepress event coordinates

fysx 11 年之前
父節點
當前提交
659b312121
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      jni/love/src/modules/event/sdl/Event.cpp

+ 2 - 0
jni/love/src/modules/event/sdl/Event.cpp

@@ -44,6 +44,7 @@ namespace sdl
 // we want them in pixel coordinates (may be different with high-DPI enabled.)
 // we want them in pixel coordinates (may be different with high-DPI enabled.)
 static void windowToPixelCoords(int *x, int *y)
 static void windowToPixelCoords(int *x, int *y)
 {
 {
+#ifndef LOVE_ANDROID
 	double scale = 1.0;
 	double scale = 1.0;
 
 
 	window::Window *window = Module::getInstance<window::Window>(Module::M_WINDOW);
 	window::Window *window = Module::getInstance<window::Window>(Module::M_WINDOW);
@@ -55,6 +56,7 @@ static void windowToPixelCoords(int *x, int *y)
 
 
 	if (y != nullptr)
 	if (y != nullptr)
 		*y = int(double(*y) * scale);
 		*y = int(double(*y) * scale);
+#endif
 }
 }
 
 
 // SDL's event watch callbacks trigger when the event is actually posted inside
 // SDL's event watch callbacks trigger when the event is actually posted inside