Skip to content

Commit

Permalink
Disable text input since this is on by default in SDL2.0
Browse files Browse the repository at this point in the history
This has been causing some "jitter" I'm quite sure. Disabling text input
should help remedy this.
  • Loading branch information
LiquidityC committed Oct 17, 2018
1 parent 7333d3d commit 0730eb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ nnoremap <F4> :ter ++close ./_build/debug/breakhack<cr>
packadd termdebug
let g:termdebug_wide = 1
let g:syntastic_c_include_dirs = [ '_build', '/usr/include/SDL2', 'steamworks_c_wrapper/src' ]
let g:syntastic_c_include_dirs = [ '_build/debug', '/usr/include/SDL2', 'steamworks_c_wrapper/src' ]
let g:syntastic_cpp_include_dirs = [ 'steamworks_c_wrapper/sdk/public/steam' ]
5 changes: 5 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ bool initSDL(void)
SDL_GetError());
return false;
}

if (SDL_IsTextInputActive()) {
debug("Disabling text input");
SDL_StopTextInput();
}

return true;
}
Expand Down

0 comments on commit 0730eb4

Please sign in to comment.