summaryrefslogtreecommitdiff
path: root/firmware/target/hosted
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/sdl/system-sdl.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c
index 750a0144a4..93a8a7cb66 100644
--- a/firmware/target/hosted/sdl/system-sdl.c
+++ b/firmware/target/hosted/sdl/system-sdl.c
@@ -138,8 +138,15 @@ static int sdl_event_thread(void * param)
138 } 138 }
139 139
140#if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA)) 140#if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA))
141 /* Hide mouse cursor on real touchscreen device */ 141 /* SDL touch screen fix: Work around a SDL assumption that returns
142 SDL_ShowCursor(SDL_DISABLE); 142 relative mouse coordinates when you get to the screen edges
143 using the touchscreen and a disabled mouse cursor.
144 */
145 uint8_t hiddenCursorData = 0;
146 SDL_Cursor *hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
147
148 SDL_ShowCursor(SDL_ENABLE);
149 SDL_SetCursor(hiddenCursor);
143#endif 150#endif
144 151
145 SDL_WM_SetCaption(UI_TITLE, NULL); 152 SDL_WM_SetCaption(UI_TITLE, NULL);
@@ -174,6 +181,10 @@ static int sdl_event_thread(void * param)
174 SDL_WaitThread(maemo_thread, NULL); 181 SDL_WaitThread(maemo_thread, NULL);
175#endif 182#endif
176 183
184#if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA))
185 SDL_FreeCursor(hiddenCursor);
186#endif
187
177 if(picture_surface) 188 if(picture_surface)
178 SDL_FreeSurface(picture_surface); 189 SDL_FreeSurface(picture_surface);
179 190