input: Set SDL ALLOW_BACKGROUND_EVENTS hint

This commit is contained in:
Jason 2020-11-23 19:45:17 -08:00 committed by GitHub
parent 2702f45cc3
commit e063fc37e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,8 @@ static const enum xemu_settings_keys port_index_to_settings_key_map[] = {
void xemu_input_init(void)
{
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
if (SDL_Init(SDL_INIT_GAMECONTROLLER) < 0) {
fprintf(stderr, "Failed to initialize SDL gamecontroller subsystem\n");
exit(1);