Skip to content
Permalink
Browse files

Call SDL_StopTextInput() during init.

Otherwise, macOS might pop up a choose-an-accented-letter window if you hold
down a key, which looks really weird in an FPS.

I had never seen this happen before, so it's not clear why this has to be
done here or if it was a fluke or something. But for now it works, and it's
not like SDL 1.2 has proper text input anyhow.
  • Loading branch information
icculus committed Mar 10, 2019
1 parent 793b2f0 commit 40f37f844a56eefda497aa74b2112ef9096e4815
Showing with 3 additions and 0 deletions.
  1. +2 −0 src/SDL12_compat.c
  2. +1 −0 src/SDL20_syms.h
@@ -1112,6 +1112,8 @@ Init12Video(void)
return -1;
}

SDL20_StopTextInput();

return 0;
}

@@ -128,6 +128,7 @@ SDL20_SYM(SDL_bool,PixelFormatEnumToMasks,(Uint32 a,int *b,Uint32 *c,Uint32 *d,U

SDL20_SYM_PASSTHROUGH(void,SetModState,(SDL_Keymod a),(a),)
SDL20_SYM_PASSTHROUGH(SDL_Keymod,GetModState,(void),(),return)
SDL20_SYM(void,StopTextInput,(void),(),)

SDL20_SYM(Uint32,GetMouseState,(int *a, int *b),(a,b),return)
SDL20_SYM(Uint32,GetRelativeMouseState,(int *a, int *b),(a,b),return)

0 comments on commit 40f37f8

Please sign in to comment.