Fix building with SDL_DISABLE_WINDOWS_IME
Regression of f317d619cc (diff-bff8f3e638d51e86cb6f0f42e2c527549d649951b7aa5ec4a539e865a5b57027R398)
main
parent
babaa7d2bd
commit
40b2499273
|
@ -54,6 +54,7 @@ static SDL_bool IME_IsTextInputShown(SDL_VideoData* videodata);
|
||||||
void
|
void
|
||||||
WIN_InitKeyboard(_THIS)
|
WIN_InitKeyboard(_THIS)
|
||||||
{
|
{
|
||||||
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
|
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
|
||||||
|
|
||||||
data->ime_com_initialized = SDL_FALSE;
|
data->ime_com_initialized = SDL_FALSE;
|
||||||
|
@ -101,6 +102,7 @@ WIN_InitKeyboard(_THIS)
|
||||||
data->ime_convmodesinkcookie = TF_INVALID_COOKIE;
|
data->ime_convmodesinkcookie = TF_INVALID_COOKIE;
|
||||||
data->ime_uielemsink = 0;
|
data->ime_uielemsink = 0;
|
||||||
data->ime_ippasink = 0;
|
data->ime_ippasink = 0;
|
||||||
|
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||||
|
|
||||||
WIN_UpdateKeymap(SDL_FALSE);
|
WIN_UpdateKeymap(SDL_FALSE);
|
||||||
|
|
||||||
|
@ -162,12 +164,12 @@ WIN_QuitKeyboard(_THIS)
|
||||||
|
|
||||||
#ifndef SDL_DISABLE_WINDOWS_IME
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
IME_Quit(data);
|
IME_Quit(data);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (data->ime_composition) {
|
if (data->ime_composition) {
|
||||||
SDL_free(data->ime_composition);
|
SDL_free(data->ime_composition);
|
||||||
data->ime_composition = NULL;
|
data->ime_composition = NULL;
|
||||||
}
|
}
|
||||||
|
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -252,6 +254,7 @@ WIN_SetTextInputRect(_THIS, const SDL_Rect *rect)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
videodata->ime_rect = *rect;
|
videodata->ime_rect = *rect;
|
||||||
|
|
||||||
himc = ImmGetContext(videodata->ime_hwnd_current);
|
himc = ImmGetContext(videodata->ime_hwnd_current);
|
||||||
|
@ -281,6 +284,7 @@ WIN_SetTextInputRect(_THIS, const SDL_Rect *rect)
|
||||||
|
|
||||||
ImmReleaseContext(videodata->ime_hwnd_current, himc);
|
ImmReleaseContext(videodata->ime_hwnd_current, himc);
|
||||||
}
|
}
|
||||||
|
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue