[SDL] Patches for wince (pocket pc)

Pavel Chernikov pchernik at gmail.com
Sat Dec 22 20:22:15 PST 2007


Hi All,

Can we patch the following files to add support of Windows CE buttons?

Index: src/video/windib/SDL_dibevents.c
===================================================================
--- src/video/windib/SDL_dibevents.c    (revision 3452)
+++ src/video/windib/SDL_dibevents.c    (working copy)
@@ -430,6 +430,15 @@
     VK_keymap[VK_SNAPSHOT] = SDLK_PRINT;
     VK_keymap[VK_CANCEL] = SDLK_BREAK;
     VK_keymap[VK_APPS] = SDLK_MENU;
+
+#ifdef _WIN32_WCE
+    VK_keymap[VK_APP1] = SDLK_APP1;
+    VK_keymap[VK_APP2] = SDLK_APP2;
+    VK_keymap[VK_APP3] = SDLK_APP3;
+    VK_keymap[VK_APP4] = SDLK_APP4;
+    VK_keymap[VK_APP5] = SDLK_APP5;
+    VK_keymap[VK_APP6] = SDLK_APP6;
+#endif
 }

 #define EXTKEYPAD(keypad) ((scancode & 0x100)?(mvke):(keypad))
Index: include/SDL_keysym.h
===================================================================
--- include/SDL_keysym.h    (revision 3452)
+++ include/SDL_keysym.h    (working copy)
@@ -281,6 +281,15 @@
     SDLK_EURO        = 321,        /* Some european keyboards */
     SDLK_UNDO        = 322,        /* Atari keyboard has Undo */

+#ifdef _WIN32_WCE
+    SDLK_APP1        = 323,
+    SDLK_APP2        = 324,
+    SDLK_APP3        = 325,
+    SDLK_APP4        = 326,
+    SDLK_APP5        = 327,
+    SDLK_APP6        = 328,
+#endif
+
     /* Add any other keys here */

     SDLK_LAST



Thanks and best regards,
-Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20071222/716ebb65/attachment-0001.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sdl_wince_diffs.txt
Url: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20071222/716ebb65/attachment-0001.txt 


More information about the SDL mailing list