Skip to content

Commit

Permalink
video: Disable text input on startup.
Browse files Browse the repository at this point in the history
The most recent versions of SDL2 seem to start up the game with text
input enabled. We don't want this; text input should only be enabled
if we're typing something in (= server address for a network game).
Having it enabled like this breaks the key rebindings screen.

Fixes bug reported on the Sopwith Discord by ranguli; thanks also to
NY00123 for investigations.
  • Loading branch information
fragglet committed Sep 11, 2023
1 parent a440e55 commit ce5184e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sdl/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ static void Vid_SetMode(void)
error_exit("Failed to open SDL window: %s", SDL_GetError());
}

SDL_StopTextInput();

pixel_format = SDL_GetWindowPixelFormat(window);

for (n = 0; n < NUM_KEYS; ++n) {
Expand Down

0 comments on commit ce5184e

Please sign in to comment.