mirror of https://github.com/libsdl-org/SDL.git
checkkeys: enable showing IME candidates
This commit is contained in:
parent
2cfeff1505
commit
258ee05655
|
|
@ -307,6 +307,7 @@ static void loop(void)
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
|
SDL_Rect input_rect;
|
||||||
|
|
||||||
SDL_SetHint(SDL_HINT_WINDOWS_RAW_KEYBOARD, "1");
|
SDL_SetHint(SDL_HINT_WINDOWS_RAW_KEYBOARD, "1");
|
||||||
|
|
||||||
|
|
@ -347,6 +348,16 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Enable showing IME candidates */
|
||||||
|
SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
|
||||||
|
|
||||||
|
/* Set an input rectangle in the center of the window */
|
||||||
|
input_rect.x = w / 4;
|
||||||
|
input_rect.y = h / 4;
|
||||||
|
input_rect.w = w / 2;
|
||||||
|
input_rect.h = h / 2;
|
||||||
|
SDL_SetTextInputRect(&input_rect);
|
||||||
|
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput();
|
||||||
|
|
||||||
/* Print initial state */
|
/* Print initial state */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue