Changed Start/StopTextInput back to not take any parameters.
We call SDL_GetKeyboardFocus internally now.
This commit is contained in:
parent
3d5a6d8597
commit
7e8c791089
7 changed files with 31 additions and 23 deletions
|
@ -141,21 +141,29 @@ WIN_QuitKeyboard(_THIS)
|
|||
}
|
||||
|
||||
void
|
||||
WIN_StartTextInput(_THIS, SDL_Window *window)
|
||||
WIN_StartTextInput(_THIS)
|
||||
{
|
||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
|
||||
IME_Init(videodata, hwnd);
|
||||
IME_Enable(videodata, hwnd);
|
||||
SDL_Window *window = SDL_GetKeyboardFocus();
|
||||
if (window)
|
||||
{
|
||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
|
||||
IME_Init(videodata, hwnd);
|
||||
IME_Enable(videodata, hwnd);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WIN_StopTextInput(_THIS, SDL_Window *window)
|
||||
WIN_StopTextInput(_THIS)
|
||||
{
|
||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
|
||||
IME_Init(videodata, hwnd);
|
||||
IME_Disable(videodata, hwnd);
|
||||
SDL_Window *window = SDL_GetKeyboardFocus();
|
||||
if (window)
|
||||
{
|
||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
|
||||
IME_Init(videodata, hwnd);
|
||||
IME_Disable(videodata, hwnd);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue