1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

add new IsSteamDeck function to versionhelpers

This commit is contained in:
FunkyFr3sh 2024-08-24 14:50:03 +02:00
parent 40ed996311
commit 136b5b30c5
2 changed files with 5 additions and 1 deletions

View File

@ -228,4 +228,8 @@ VERSIONHELPERAPI IsAndroid(void) {
return release && strstr(release, "android") != NULL;
}
VERSIONHELPERAPI IsSteamDeck(void) {
return IsWine() && !GetEnvironmentVariable("STEAMDECK", NULL, 0);
}
#endif

View File

@ -1163,7 +1163,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
Fix wayland bug:
ChangeDisplaySettings fails silently - enable borderless mode in case display resolution was not changed
*/
if (IsWine() && !GetEnvironmentVariable("STEAMDECK", NULL, 0) &&
if (IsWine() && !IsSteamDeck() &&
(g_ddraw.render.mode.dmPelsWidth != real_GetSystemMetrics(SM_CXSCREEN) ||
g_ddraw.render.mode.dmPelsHeight != real_GetSystemMetrics(SM_CYSCREEN)))
{