From 52def78851df14b28a065eb7974ea6051a3debad Mon Sep 17 00:00:00 2001 From: dewyatt Date: Tue, 8 Jun 2010 05:22:49 -0400 Subject: [PATCH] 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. --- src/video/win32/SDL_win32events.c | 2 +- src/video/win32/SDL_win32window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/win32/SDL_win32events.c b/src/video/win32/SDL_win32events.c index df4a3b722..6d30beee8 100644 --- a/src/video/win32/SDL_win32events.c +++ b/src/video/win32/SDL_win32events.c @@ -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)) { diff --git a/src/video/win32/SDL_win32window.c b/src/video/win32/SDL_win32window.c index f69d38573..d69ba6a63 100644 --- a/src/video/win32/SDL_win32window.c +++ b/src/video/win32/SDL_win32window.c @@ -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);