Use 999999 as the 'big' value instead of 2**31-1

This commit is contained in:
Lauri Kenttä
2023-09-14 18:08:39 +03:00
parent 62c892009a
commit 0ce904f133

View File

@@ -51,8 +51,8 @@ static void SetResolution(int w, int h) {
UINTN best_i = gop->Mode->Mode;
int best_w = config.old_resolution_x = gop->Mode->Info->HorizontalResolution;
int best_h = config.old_resolution_y = gop->Mode->Info->VerticalResolution;
w = (w <= 0 ? w < 0 ? best_w : 0x7fffffff : w);
h = (h <= 0 ? h < 0 ? best_h : 0x7fffffff : h);
w = (w <= 0 ? w < 0 ? best_w : 999999 : w);
h = (h <= 0 ? h < 0 ? best_h : 999999 : h);
Debug(L"Looking for resolution %dx%d...\n", w, h);
for (UINT32 i = gop->Mode->MaxMode; i--;) {