Skip to content

Commit f7f4d39

Browse files
committed
LG WebOS: Use non-global GetMouseState
1 parent ad1d1d4 commit f7f4d39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/video/sdl2_v.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ static uint FindStartupDisplay(uint startup_display)
109109

110110
/* Mouse position decides which display to use. */
111111
int mx, my;
112-
SDL_GetGlobalMouseState(&mx, &my);
112+
#ifdef WEBOS
113+
/* LG WebOS apps are always fullscreen, this increases compat */
114+
SDL_GetMouseState(&mx, &my);
115+
#else
116+
SDL_GetGlobalMouseState(&mx, &my);
117+
#endif
113118
for (int display = 0; display < num_displays; ++display) {
114119
SDL_Rect r;
115120
if (SDL_GetDisplayBounds(display, &r) == 0 && IsInsideBS(mx, r.x, r.w) && IsInsideBS(my, r.y, r.h)) {

0 commit comments

Comments
 (0)