Skip to content

Commit

Permalink
Call SDL_StopTextInput() during init.
Browse files Browse the repository at this point in the history
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 40f37f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SDL12_compat.c
Expand Up @@ -1112,6 +1112,8 @@ Init12Video(void)
return -1;
}

SDL20_StopTextInput();

return 0;
}

Expand Down
1 change: 1 addition & 0 deletions src/SDL20_syms.h
Expand Up @@ -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)
Expand Down

0 comments on commit 40f37f8

Please sign in to comment.