From dde28b32488d5bdf27e75bdc2d0152c44788b31b Mon Sep 17 00:00:00 2001 From: wiktorwiktor12 Date: Sun, 7 Jul 2024 01:29:34 +0100 Subject: [PATCH] i forgot an extra check --- ConsoleLogonUI/ui/dui_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConsoleLogonUI/ui/dui_manager.cpp b/ConsoleLogonUI/ui/dui_manager.cpp index b782605..0c20a0b 100644 --- a/ConsoleLogonUI/ui/dui_manager.cpp +++ b/ConsoleLogonUI/ui/dui_manager.cpp @@ -497,7 +497,7 @@ static bool GetBackground(HBITMAP* OutBitmap) int dw = 0; int dh = 0; if (GetBitmapResolution(bitmapDefault, &dw, &dh) && BitmapAspectRatioEqualsScreen(bitmapDefault)) { - if (dw > dataToUse->w || dh > dataToUse->h) + if ((dw > dataToUse->w || dh > dataToUse->h) && dw <= GetSystemMetrics(SM_CXSCREEN) && dh <= GetSystemMetrics(SM_CYSCREEN)) bDefaultBetter = true; }