Change SDL to not use DefWindowProc as the window class' window procedure.

For some reason, having lpfnWndProc=DefWindowProc during window class registration causes IME input to not work in windows.
With this small change, IME input should now work in SDL windows but not in fullscreen mode.
This commit is contained in:
dewyatt 2010-06-08 05:22:49 -04:00
parent a1f1bc8952
commit 52def78851
2 changed files with 2 additions and 2 deletions

View file

@ -703,7 +703,7 @@ SDL_RegisterApp(char *name, Uint32 style, void *hInst)
class.hbrBackground = NULL;
class.hInstance = SDL_Instance;
class.style = SDL_Appstyle;
class.lpfnWndProc = DefWindowProc;
class.lpfnWndProc = WIN_WindowProc;
class.cbWndExtra = 0;
class.cbClsExtra = 0;
if (!RegisterClass(&class)) {

View file

@ -112,7 +112,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
/* Set up the window proc function */
data->wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
if (data->wndproc == DefWindowProc) {
if (data->wndproc == WIN_WindowProc) {
data->wndproc = NULL;
}
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc);