mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-02-24 06:31:04 +00:00
implement fix for potential window size crash
This commit is contained in:
parent
5e8695a157
commit
12f2e6a42a
1 changed files with 8 additions and 3 deletions
|
|
@ -1255,9 +1255,14 @@ static void DrawConfigOptions()
|
|||
|
||||
case 3: // VIDEO
|
||||
{
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::WindowSize,
|
||||
!Config::Fullscreen, &Localise("Options_Desc_NotAvailableFullscreen"),
|
||||
0, 0, (int32_t)GameWindow::GetDisplayModes().size() - 1, false);
|
||||
auto displayModeCount = (int32_t)GameWindow::GetDisplayModes().size();
|
||||
auto canChangeWindowSize = !Config::Fullscreen && displayModeCount > 1;
|
||||
auto windowSizeReason = &Localise("Options_Desc_NotAvailableFullscreen");
|
||||
|
||||
if (!Config::Fullscreen && displayModeCount <= 1)
|
||||
windowSizeReason = &Localise("Options_Desc_NotAvailableHardware");
|
||||
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::WindowSize, canChangeWindowSize, windowSizeReason, 0, 0, displayModeCount - 1, false);
|
||||
|
||||
auto displayCount = GameWindow::GetDisplayCount();
|
||||
auto canChangeMonitor = Config::Fullscreen && displayCount > 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue