Widescreen Hotkey (#2080)

* Widescreen Hotkey

Added the ability to toggle Widescreen Hack and set the Aspect Ratio via a hotkey.

This is in response to Discussion #1912 (https://github.com/stenzek/duckstation/discussions/1912)

* Widescreen Hotkey Uses Settings

The Widescreen Hotkey now looks at the user's global or game settings when toggling.  This means:
When disabling the widescreen hack it uses a non-wide ratio as set by the user if available or auto if unavailable.
When enabling the widescreen hack it uses a wide ratio as set by the user if available or 16:9 if unavailable.

* Avoids loading the entire settings now.

Specifically loads the aspect ratio setting.
This commit is contained in:
ValadAmoleo
2021-05-11 06:00:47 +01:00
committed by Connor McLaughlin
parent d77dfb4b23
commit 057c264d97
2 changed files with 38 additions and 0 deletions

View File

@ -269,6 +269,9 @@ public:
/// Reloads post processing shaders with the current configuration.
void ReloadPostProcessingShaders();
/// Toggle Widescreen Hack and Aspect Ratio
void ToggleWidescreen();
/// Parses a fullscreen mode into its components (width * height @ refresh hz)
static bool ParseFullscreenMode(const std::string_view& mode, u32* width, u32* height, float* refresh_rate);