Added export to disable rounded corners on Windows 11 (#212)

This commit is contained in:
Hyper 2025-01-27 18:25:15 +00:00 committed by GitHub
parent 948e2f271f
commit 9521cb3ee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -231,6 +231,12 @@ void GameWindow::Init(const char* sdlVideoDriver)
#if defined(_WIN32)
s_renderWindow = info.info.win.window;
if (Config::DisableDWMRoundedCorners)
{
DWM_WINDOW_CORNER_PREFERENCE wcp = DWMWCP_DONOTROUND;
DwmSetWindowAttribute(s_renderWindow, DWMWA_WINDOW_CORNER_PREFERENCE, &wcp, sizeof(wcp));
}
#elif defined(SDL_VULKAN_ENABLED)
s_renderWindow = s_pWindow;
#elif defined(__linux__)

View file

@ -77,6 +77,7 @@ CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIScaleMode, UIScaleMode, EUIScaleMode::E
CONFIG_DEFINE_HIDDEN("Exports", bool, AllowCancellingUnleash, false);
CONFIG_DEFINE_HIDDEN("Exports", bool, DisableAutoSaveWarning, false);
CONFIG_DEFINE_HIDDEN("Exports", bool, DisableDLCIcon, false);
CONFIG_DEFINE_HIDDEN("Exports", bool, DisableDWMRoundedCorners, false);
CONFIG_DEFINE_HIDDEN("Exports", bool, FixUnleashOutOfControlDrain, false);
CONFIG_DEFINE_HIDDEN("Exports", bool, HomingAttackOnBoost, true);
CONFIG_DEFINE_HIDDEN("Exports", bool, SaveScoreAtCheckpoints, false);