Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_sysevents.c @ 1272:94c0709f8856
Compile fix for Window CE
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 26 Jan 2006 08:08:22 +0000 |
parents | 7c7ddaf195bf |
children | f61f045343d3 |
comparison
equal
deleted
inserted
replaced
1271:092722dbc766 | 1272:94c0709f8856 |
---|---|
77 void (*WIN_RealizePalette)(_THIS); | 77 void (*WIN_RealizePalette)(_THIS); |
78 void (*WIN_PaletteChanged)(_THIS, HWND window); | 78 void (*WIN_PaletteChanged)(_THIS, HWND window); |
79 void (*WIN_WinPAINT)(_THIS, HDC hdc); | 79 void (*WIN_WinPAINT)(_THIS, HDC hdc); |
80 extern void DIB_SwapGamma(_THIS); | 80 extern void DIB_SwapGamma(_THIS); |
81 | 81 |
82 #ifndef NO_GETKEYBOARDSTATE | |
82 /* Variables and support functions for SDL_ToUnicode() */ | 83 /* Variables and support functions for SDL_ToUnicode() */ |
83 static int codepage; | 84 static int codepage; |
84 static int Is9xME(); | 85 static int Is9xME(); |
85 static int GetCodePage(); | 86 static int GetCodePage(); |
86 static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, BYTE *keystate, Uint16 *wchars, int wsize, UINT flags); | 87 static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, BYTE *keystate, Uint16 *wchars, int wsize, UINT flags); |
87 | 88 |
88 ToUnicodeFN SDL_ToUnicode = ToUnicode9xME; | 89 ToUnicodeFN SDL_ToUnicode = ToUnicode9xME; |
90 #endif /* !NO_GETKEYBOARDSTATE */ | |
89 | 91 |
90 | 92 |
91 #if defined(_WIN32_WCE) | 93 #if defined(_WIN32_WCE) |
92 | 94 |
93 // dynamically load aygshell dll because we want SDL to work on HPC and be300 | 95 // dynamically load aygshell dll because we want SDL to work on HPC and be300 |
629 case WM_DESTROY: { | 631 case WM_DESTROY: { |
630 PostQuitMessage(0); | 632 PostQuitMessage(0); |
631 } | 633 } |
632 return(0); | 634 return(0); |
633 | 635 |
636 #ifndef NO_GETKEYBOARDSTATE | |
634 case WM_INPUTLANGCHANGE: { | 637 case WM_INPUTLANGCHANGE: { |
635 codepage = GetCodePage(); | 638 codepage = GetCodePage(); |
636 } | 639 } |
637 return(TRUE); | 640 return(TRUE); |
641 #endif | |
638 | 642 |
639 default: { | 643 default: { |
640 /* Special handling by the video driver */ | 644 /* Special handling by the video driver */ |
641 if (HandleMessage) { | 645 if (HandleMessage) { |
642 return(HandleMessage(current_video, | 646 return(HandleMessage(current_video, |
740 #endif /* WM_MOUSELEAVE */ | 744 #endif /* WM_MOUSELEAVE */ |
741 | 745 |
742 /* Check for SDL_WINDOWID hack */ | 746 /* Check for SDL_WINDOWID hack */ |
743 SDL_windowid = getenv("SDL_WINDOWID"); | 747 SDL_windowid = getenv("SDL_WINDOWID"); |
744 | 748 |
749 #ifndef NO_GETKEYBOARDSTATE | |
745 /* Initialise variables for SDL_ToUnicode() */ | 750 /* Initialise variables for SDL_ToUnicode() */ |
746 codepage = GetCodePage(); | 751 codepage = GetCodePage(); |
747 SDL_ToUnicode = Is9xME() ? ToUnicode9xME : ToUnicode; | 752 SDL_ToUnicode = Is9xME() ? ToUnicode9xME : ToUnicode; |
753 #endif | |
748 | 754 |
749 app_registered = 1; | 755 app_registered = 1; |
750 return(0); | 756 return(0); |
751 } | 757 } |
752 | 758 |
767 } | 773 } |
768 } | 774 } |
769 app_registered = 0; | 775 app_registered = 0; |
770 } | 776 } |
771 | 777 |
778 #ifndef NO_GETKEYBOARDSTATE | |
772 /* JFP: Implementation of ToUnicode() that works on 9x/ME/2K/XP */ | 779 /* JFP: Implementation of ToUnicode() that works on 9x/ME/2K/XP */ |
773 | 780 |
774 static int Is9xME() | 781 static int Is9xME() |
775 { | 782 { |
776 OSVERSIONINFO info; | 783 OSVERSIONINFO info; |
803 return MultiByteToWideChar(codepage, 0, chars, 1, wchars, wsize); | 810 return MultiByteToWideChar(codepage, 0, chars, 1, wchars, wsize); |
804 } | 811 } |
805 return 0; | 812 return 0; |
806 } | 813 } |
807 | 814 |
815 #endif /* !NO_GETKEYBOARDSTATE */ |