[prev in list] [next in list] [prev in thread] [next in thread]
List: rockbox-cvs
Subject: thomasjfox: r29925 - trunk/firmware/target/hosted/sdl
From: mailer () svn ! rockbox ! org
Date: 2011-05-25 20:11:03
Message-ID: 201105252011.p4PKB3QQ012300 () giant ! haxx ! se
[Download RAW message or body]
Date: 2011-05-25 22:11:03 +0200 (Wed, 25 May 2011)
New Revision: 29925
Log Message:
Fix SDL touch screen handling on the screen edges
Modified:
trunk/firmware/target/hosted/sdl/system-sdl.c
Modified: trunk/firmware/target/hosted/sdl/system-sdl.c
===================================================================
--- trunk/firmware/target/hosted/sdl/system-sdl.c 2011-05-25 08:44:49 UTC (rev 29924)
+++ trunk/firmware/target/hosted/sdl/system-sdl.c 2011-05-25 20:11:03 UTC (rev 29925)
@@ -138,8 +138,15 @@
}
#if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA))
- /* Hide mouse cursor on real touchscreen device */
- SDL_ShowCursor(SDL_DISABLE);
+ /* SDL touch screen fix: Work around a SDL assumption that returns
+ relative mouse coordinates when you get to the screen edges
+ using the touchscreen and a disabled mouse cursor.
+ */
+ uint8_t hiddenCursorData = 0;
+ SDL_Cursor *hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
+
+ SDL_ShowCursor(SDL_ENABLE);
+ SDL_SetCursor(hiddenCursor);
#endif
SDL_WM_SetCaption(UI_TITLE, NULL);
@@ -174,6 +181,10 @@
SDL_WaitThread(maemo_thread, NULL);
#endif
+#if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA))
+ SDL_FreeCursor(hiddenCursor);
+#endif
+
if(picture_surface)
SDL_FreeSurface(picture_surface);
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs@cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic