Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Change SDL to not use DefWindowProc as the window class' window proce…

…dure.

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.
  • Loading branch information
dewyatt
dewyatt committed Jun 8, 2010
1 parent e0a87ed commit 683b09d3afafe0de8bc066460e06e83bfd9c6784
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/video/win32/SDL_win32events.c
  2. +1 −1 src/video/win32/SDL_win32window.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)) {
@@ -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);

0 comments on commit 683b09d

Please sign in to comment.