From 40f37f844a56eefda497aa74b2112ef9096e4815 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 10 Mar 2019 00:18:10 -0500 Subject: [PATCH] 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. --- src/SDL12_compat.c | 2 ++ src/SDL20_syms.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c index 59ae522c2..1dfb0d201 100644 --- a/src/SDL12_compat.c +++ b/src/SDL12_compat.c @@ -1112,6 +1112,8 @@ Init12Video(void) return -1; } + SDL20_StopTextInput(); + return 0; } diff --git a/src/SDL20_syms.h b/src/SDL20_syms.h index 90f09812d..063725b57 100644 --- a/src/SDL20_syms.h +++ b/src/SDL20_syms.h @@ -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)