Skip to content

Commit

Permalink
Merge pull request #19441 from hrydgard/mac-key-input-fix
Browse files Browse the repository at this point in the history
Mac SDL: Remove an annoying popup that happens when holding keys on some SDL versions
  • Loading branch information
hrydgard authored Sep 9, 2024
2 parents 3f32d8e + 6a91af7 commit 7f1b43b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SDL/SDLMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,10 @@ int main(int argc, char *argv[]) {
// Ensure that the swap interval is set after context creation (needed for kmsdrm)
SDL_GL_SetSwapInterval(1);

// Avoid the IME popup when holding keys. This doesn't affect all versions of SDL.
// TODO: Enable it in text input fields
SDL_StopTextInput();

InitSDLAudioDevice();

if (joystick_enabled) {
Expand Down

0 comments on commit 7f1b43b

Please sign in to comment.