Fix Steam Deck's Game Mode also

This commit is contained in:
vkedwardli 2022-11-04 23:01:06 +08:00 committed by GitHub
parent c15f446ffc
commit 605dc59f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -736,7 +736,7 @@ bool VulkanContext::init()
int displayIndex = SDL_GetWindowDisplayIndex(sdlWin);
SDL_DisplayMode mode;
SDL_GetDisplayMode(displayIndex, 0, &mode);
if ( displayIndex == 0 && strcmp(SDL_GetDisplayName(displayIndex), "ANX7530 U 3\"") == 0 && mode.w == 1280 && mode.h == 800 )
if ( displayIndex == 0 && (strcmp(SDL_GetDisplayName(displayIndex), "ANX7530 U 3\"") == 0 || strcmp(SDL_GetDisplayName(displayIndex), "XWAYLAND0 3\"") == 0) && mode.w == 1280 && mode.h == 800 )
settings.display.dpi = 206;
}
#endif

View File

@ -92,7 +92,7 @@ bool SDLGLGraphicsContext::init()
int displayIndex = SDL_GetWindowDisplayIndex(sdlWindow);
SDL_DisplayMode mode;
SDL_GetDisplayMode(displayIndex, 0, &mode);
if ( displayIndex == 0 && strcmp(SDL_GetDisplayName(displayIndex), "ANX7530 U 3\"") == 0 && mode.w == 1280 && mode.h == 800 )
if ( displayIndex == 0 && (strcmp(SDL_GetDisplayName(displayIndex), "ANX7530 U 3\"") == 0 || strcmp(SDL_GetDisplayName(displayIndex), "XWAYLAND0 3\"") == 0) && mode.w == 1280 && mode.h == 800 )
settings.display.dpi = 206;
}
#endif