mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Check Windows version before setting window attributes
(cherry picked from commit 159bba9aa1)
This commit is contained in:
parent
db3ff5f5c4
commit
a004c1bcc4
1 changed files with 2 additions and 2 deletions
|
|
@ -1227,7 +1227,7 @@ static void WIN_UpdateCornerRoundingForHWND(SDL_VideoDevice *_this, HWND hwnd, D
|
|||
{
|
||||
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||
SDL_VideoData *videodata = _this->internal;
|
||||
if (videodata->DwmSetWindowAttribute) {
|
||||
if (videodata->DwmSetWindowAttribute && WIN_IsWindows11OrGreater()) {
|
||||
videodata->DwmSetWindowAttribute(hwnd, DWMWA_WINDOW_CORNER_PREFERENCE, &cornerPref, sizeof(cornerPref));
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1237,7 +1237,7 @@ static void WIN_UpdateBorderColorForHWND(SDL_VideoDevice *_this, HWND hwnd, COLO
|
|||
{
|
||||
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||
SDL_VideoData *videodata = _this->internal;
|
||||
if (videodata->DwmSetWindowAttribute) {
|
||||
if (videodata->DwmSetWindowAttribute && WIN_IsWindows11OrGreater()) {
|
||||
videodata->DwmSetWindowAttribute(hwnd, DWMWA_BORDER_COLOR, &colorRef, sizeof(colorRef));
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue