diff --git a/src/Config.h b/src/Config.h index ae3e7400a..07ffa138a 100644 --- a/src/Config.h +++ b/src/Config.h @@ -99,8 +99,9 @@ struct Config aStretch = 0, a43 = 1, a169 = 2, - aAdjust = 3, - aTotal = 4 + aAdjust43 = 3, + aAdjust169 = 4, + aTotal = 5 }; enum CopyToRDRAM { diff --git a/src/DisplayWindow.cpp b/src/DisplayWindow.cpp index 8c6ad8a3d..59725f626 100644 --- a/src/DisplayWindow.cpp +++ b/src/DisplayWindow.cpp @@ -174,7 +174,7 @@ void DisplayWindow::_setBufferSize() m_height = m_screenHeight; } break; - case Config::aAdjust: // adjust + case Config::aAdjust43: // adjust m_width = m_screenWidth; m_height = m_screenHeight; if (m_screenWidth * 3 / 4 > m_screenHeight) { @@ -183,6 +183,15 @@ void DisplayWindow::_setBufferSize() m_bAdjustScreen = true; } break; + case Config::aAdjust169: // adjust + m_width = m_screenWidth; + m_height = m_screenHeight; + if (m_screenWidth * 9 / 16 > m_screenHeight) { + f32 width169 = m_screenHeight * 16.0f / 9.0f; + m_adjustScale = width169 / m_screenWidth; + m_bAdjustScreen = true; + } + break; default: assert(false && "Unknown aspect ratio"); m_width = m_screenWidth; diff --git a/src/GLideNUI-wtl/Language.cpp b/src/GLideNUI-wtl/Language.cpp index 403222991..d629f6d3b 100644 --- a/src/GLideNUI-wtl/Language.cpp +++ b/src/GLideNUI-wtl/Language.cpp @@ -33,11 +33,12 @@ void LoadDefaultStrings(void) g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_WINDOWED_RESOLUTION, "Windowed resolution:")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_WINDOWED_RESOLUTION_TOOLTIP, "This option selects the resolution for windowed mode. You can also type in a custom window size.\n\n[Recommended: 640 x 480, 800 x 600, 1024 x 768, 1280 x 960]")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_RATIO, "Aspect ratio:")); - g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_RATIO_TOOLTIP, "This setting adjusts the aspect ratio of the video output. All N64 games support 4:3. Some games support 16:9 within game settings. Use Stretch to fill the screen without pillar or letterboxing.\n\nTry to adjust game to fit tries to adjust the viewing space to fit without stretching. Many games work well adjusted, but some don't.")); + g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_RATIO_TOOLTIP, "This setting adjusts the aspect ratio of the video output. All N64 games support 4:3. Some games support 16:9 within game settings. Use Stretch to fill the screen without pillar or letterboxing.\n\nTry to adjust 4:3 game to fit (also known as \"widescreen hack\") tries to adjust the viewing space to fit a game designed for 4:3 without stretching. Many games work well adjusted, but some don't.\n\nTry to adjust 16:9 game to fit</span> (also known as \"ultrawidescreen hack\") tries to adjust the viewing space to fit a game designed for 16:9 without stretching. Many games work well adjusted, but some don't. For games offering native 16:9 options, this is generally preferable for ultrawide aspect ratios as it'll lead to fewer rendering issues.")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_4_3, "4:3 (recommended)")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_16_19, "16:9")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_STRETCH, "Stretch")); - g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_ADJUST, "Try to adjust game to fit")); + g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_ADJUST, "Try to adjust 4:3 game to fit")); + g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_ASPECT_ADJUST, "Try to adjust 16:9 game to fit")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_VSYNC, "Enable VSync")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_VSYNC_TOOLTIP, "Vertical sync, or VSync, can improve the image by syncing the game's frame rate to your monitor's refresh rate. This prevents image tearing, but may cause performance problems.\n\n[Recommended: Usually off, on if you have image tearing problems]")); g_defaultStrings.insert(LANG_STRINGS::value_type(VIDEO_THREADED_VIDEO, "Enable threaded video")); diff --git a/src/GLideNUI-wtl/config-video.cpp b/src/GLideNUI-wtl/config-video.cpp index 7456f733c..8c56fd056 100644 --- a/src/GLideNUI-wtl/config-video.cpp +++ b/src/GLideNUI-wtl/config-video.cpp @@ -477,7 +477,8 @@ void CVideoTab::LoadSettings(bool /*blockCustomSettings*/) { case Config::aStretch: aspectComboBox.SetCurSel(2); break; case Config::a43: aspectComboBox.SetCurSel(0); break; case Config::a169: aspectComboBox.SetCurSel(1); break; - case Config::aAdjust: aspectComboBox.SetCurSel(3); break; + case Config::aAdjust43: aspectComboBox.SetCurSel(3); break; + case Config::aAdjust169: aspectComboBox.SetCurSel(4); break; } CComboBox(GetDlgItem(IDC_CMB_PATTERN)).SetCurSel(config.generalEmulation.rdramImageDitheringMode); @@ -522,7 +523,8 @@ void CVideoTab::SaveSettings() if (AspectIndx == 2) { config.frameBufferEmulation.aspect = Config::aStretch; } else if (AspectIndx == 0) { config.frameBufferEmulation.aspect = Config::a43; } else if (AspectIndx == 1) { config.frameBufferEmulation.aspect = Config::a169; } - else if (AspectIndx == 3) { config.frameBufferEmulation.aspect = Config::aAdjust; } + else if (AspectIndx == 3) { config.frameBufferEmulation.aspect = Config::aAdjust43; } + else if (AspectIndx == 4) { config.frameBufferEmulation.aspect = Config::aAdjust169; } config.video.verticalSync = CButton(GetDlgItem(IDC_CHK_VERTICAL_SYNC)).GetCheck() == BST_CHECKED; config.video.threadedVideo = CButton(GetDlgItem(IDC_CHK_THREADED_VIDEO)).GetCheck() == BST_CHECKED; diff --git a/src/GLideNUI/ConfigDialog.cpp b/src/GLideNUI/ConfigDialog.cpp index da8fbd1fa..d9dc88053 100644 --- a/src/GLideNUI/ConfigDialog.cpp +++ b/src/GLideNUI/ConfigDialog.cpp @@ -330,9 +330,12 @@ void ConfigDialog::_init(bool reInit, bool blockCustomSettings) case Config::a169: ui->aspectComboBox->setCurrentIndex(1); break; - case Config::aAdjust: + case Config::aAdjust43: ui->aspectComboBox->setCurrentIndex(3); break; + case Config::aAdjust169: + ui->aspectComboBox->setCurrentIndex(4); + break; } ui->resolutionFactorSpinBox->valueChanged(2); @@ -649,7 +652,9 @@ void ConfigDialog::accept(bool justSave) { else if (ui->aspectComboBox->currentIndex() == 1) config.frameBufferEmulation.aspect = Config::a169; else if (ui->aspectComboBox->currentIndex() == 3) - config.frameBufferEmulation.aspect = Config::aAdjust; + config.frameBufferEmulation.aspect = Config::aAdjust43; + else if (ui->aspectComboBox->currentIndex() == 4) + config.frameBufferEmulation.aspect = Config::aAdjust169; if (ui->factor0xRadioButton->isChecked()) config.frameBufferEmulation.nativeResFactor = 0; diff --git a/src/GLideNUI/configDialog.ui b/src/GLideNUI/configDialog.ui index 70b4bf58e..7f8f8ad1a 100644 --- a/src/GLideNUI/configDialog.ui +++ b/src/GLideNUI/configDialog.ui @@ -168,7 +168,7 @@ - <html><head/><body><p>This setting adjusts the aspect ratio of the video output. All N64 games support <span style=" font-weight:600;">4:3</span>. Some games support <span style=" font-weight:600;">16:9</span> within game settings. Use <span style=" font-weight:600;">Stretch</span> to fill the screen without pillar or letterboxing.</p><p><span style=" font-weight:600;">Try to adjust game to fit</span> tries to adjust the viewing space to fit without stretching. Many games work well adjusted, but some don't.</p></body></html> + <html><head/><body><p>This setting adjusts the aspect ratio of the video output. All N64 games support <span style=" font-weight:600;">4:3</span>. Some games support <span style=" font-weight:600;">16:9</span> within game settings. Use <span style=" font-weight:600;">Stretch</span> to fill the screen without pillar or letterboxing.</p><p><span style=" font-weight:600;">Try to adjust 4:3 game to fit</span> (also known as "widescreen hack") tries to adjust the viewing space to fit a game designed for 4:3 without stretching. Many games work well adjusted, but some don't.</p><p><span style=" font-weight:600;">Try to adjust 16:9 game to fit</span> (also known as "ultrawidescreen hack") tries to adjust the viewing space to fit a game designed for 16:9 without stretching. Many games work well adjusted, but some don't. For games offering native 16:9 options, this is generally preferable for ultrawide aspect ratios as it'll lead to fewer rendering issues.</p></body></html> @@ -212,7 +212,12 @@ - Try to adjust game to fit + Try to adjust 4:3 game to fit + + + + + Try to adjust 16:9 game to fit