Skip to content

Commit

Permalink
Apple TV 4K resolution fix and fix for Remote getting recognized as a…
Browse files Browse the repository at this point in the history
… controller
  • Loading branch information
ckosmic committed Nov 17, 2021
1 parent 930783c commit 8f63446
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Binary file not shown.
5 changes: 5 additions & 0 deletions src/pc/controller/controller_sdl2.c
Expand Up @@ -182,6 +182,11 @@ static void controller_sdl_read(OSContPad *pad) {
if (SDL_IsGameController(i)) {
sdl_cntrl = SDL_GameControllerOpen(i);
if (sdl_cntrl != NULL) {
if(strcmp(SDL_GameControllerName(sdl_cntrl), "Remote") == 0) {
// Ignore Apple TV remote as a game controller
sdl_cntrl = NULL;
continue;
}
sdl_haptic = controller_sdl_init_haptics(i);
break;
}
Expand Down
2 changes: 2 additions & 0 deletions src/pc/gfx/gfx_sdl2.m
Expand Up @@ -390,6 +390,7 @@ static void gfx_sdl_handle_events(void) {
case SDL_FINGERUP:
gfx_sdl_fingerup(event.tfinger);
break;
#endif
case SDL_WINDOWEVENT: // TODO: Check if this makes sense to be included in the Web build
if (!IS_FULLSCREEN()) {
switch (event.window.event) {
Expand All @@ -415,6 +416,7 @@ static void gfx_sdl_handle_events(void) {
}
}
break;
#if TARGET_OS_IOS
case SDL_DISPLAYEVENT:
switch(event.display.event) {
case SDL_DISPLAYEVENT_CONNECTED:
Expand Down

0 comments on commit 8f63446

Please sign in to comment.