diff --git a/Standard Gaming Platform/sgp.cpp b/Standard Gaming Platform/sgp.cpp index d085ee65..d070b779 100644 --- a/Standard Gaming Platform/sgp.cpp +++ b/Standard Gaming Platform/sgp.cpp @@ -1520,6 +1520,10 @@ void GetRuntimeSettings( ) iResX = 640; iResY = 480; break; + case _960x540: + iResX = 960; + iResY = 540; + break; case _800x600: iResX = 800; iResY = 600; @@ -1613,13 +1617,16 @@ void GetRuntimeSettings( ) iResY = 1600; break; case _CustomRes: - iResX = max( (int)oProps.getIntProperty(L"Ja2 Settings", L"CUSTOM_SCREEN_RESOLUTION_X", -1), 800 ); - iResY = max( (int)oProps.getIntProperty(L"Ja2 Settings", L"CUSTOM_SCREEN_RESOLUTION_Y", -1), 600 ); - if ( iResX < 1024 || iResY < 768 ) - { - // Buggler: hack to use 800x600 interface - iResolution = _1280x720; - } + iResX = max( (int)oProps.getIntProperty(L"Ja2 Settings", L"CUSTOM_SCREEN_RESOLUTION_X", -1), 640 ); + iResY = max( (int)oProps.getIntProperty(L"Ja2 Settings", L"CUSTOM_SCREEN_RESOLUTION_Y", -1), 480 ); + + if (iResX < 800 || iResY < 600) + iResolution = _640x480; + else if (iResX < 1024 || iResY < 768) + iResolution = _800x600; + else + iResolution = _1024x768; + break; default: // 800x600 iResolution = _800x600; diff --git a/local.h b/local.h index c26bd5af..3f59e708 100644 --- a/local.h +++ b/local.h @@ -47,33 +47,35 @@ typedef enum // The 640x480 resolution should always be the FIRST entry in this enum _640x480 = 0, + _960x540 = 1, + // Place all resolutions that have both (a lower height AND a lower width) BEFORE the 800x600 resolution - _800x600 = 1, - _1024x600 = 2, - _1280x720 = 3, + _800x600 = 2, + _1024x600 = 3, + _1280x720 = 4, // Place all resolutions that have both (a lower height AND a lower width) BEFORE the 1024x768 resolution - _1024x768 = 4, - _1280x768 = 5, - _1360x768 = 6, - _1366x768 = 7, - _1280x800 = 8, - _1440x900 = 9, - _1600x900 = 10, - _1280x960 = 11, - _1440x960 = 12, - _1770x1000 = 13, - _1280x1024 = 14, - _1360x1024 = 15, - _1600x1024 = 16, - _1440x1050 = 17, - _1680x1050 = 18, - _1920x1080 = 19, - _1600x1200 = 20, - _1920x1200 = 21, - _2560x1440 = 22, - _2560x1600 = 23, - _CustomRes = 24, + _1024x768 = 5, + _1280x768 = 6, + _1360x768 = 7, + _1366x768 = 8, + _1280x800 = 9, + _1440x900 = 10, + _1600x900 = 11, + _1280x960 = 12, + _1440x960 = 13, + _1770x1000 = 14, + _1280x1024 = 15, + _1360x1024 = 16, + _1600x1024 = 17, + _1440x1050 = 18, + _1680x1050 = 19, + _1920x1080 = 20, + _1600x1200 = 21, + _1920x1200 = 22, + _2560x1440 = 23, + _2560x1600 = 24, + _CustomRes = 25, } SCREEN_RESOLUTION; extern BOOLEAN fDisplayOverheadMap;