summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 05db9a80..cf611e31 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -2110,12 +2110,19 @@ iInt2 coord_Window(const iWindow *d, int x, int y) {
2110} 2110}
2111 2111
2112iInt2 mouseCoord_Window(const iWindow *d) { 2112iInt2 mouseCoord_Window(const iWindow *d) {
2113#if defined (iPlatformMobile)
2114 /* At least on iOS the coordinates returned by SDL_GetMouseState() do no match up with
2115 our touch coordinates on the Y axis (?). Maybe a pixel ratio thing? */
2116 iUnused(d);
2117 return latestPosition_Touch();
2118#else
2113 if (!d->isMouseInside) { 2119 if (!d->isMouseInside) {
2114 return init_I2(-1000000, -1000000); 2120 return init_I2(-1000000, -1000000);
2115 } 2121 }
2116 int x, y; 2122 int x, y;
2117 SDL_GetMouseState(&x, &y); 2123 SDL_GetMouseState(&x, &y);
2118 return coord_Window(d, x, y); 2124 return coord_Window(d, x, y);
2125#endif
2119} 2126}
2120 2127
2121float uiScale_Window(const iWindow *d) { 2128float uiScale_Window(const iWindow *d) {