Allow SDL2 Experiment 17 to have joystick input while unfocused

This commit is contained in:
Barra Ó Catháin 2023-03-02 14:40:14 +00:00
parent 25be55e1cd
commit 0179459ac5
1 changed files with 2 additions and 1 deletions

View File

@ -233,6 +233,7 @@ int main(int argc, char ** argv)
// Initialize image loading:
IMG_Init(IMG_INIT_PNG);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "2");
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
// Create an SDL window and rendering context in that window:
SDL_Window * window = SDL_CreateWindow("SDL_TEST", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 700, 700, 0);