general: Implement FullscreenMode enumeration

Prevents us from using an unclear 0 or 1 to describe the fullscreen
mode.
This commit is contained in:
lat9nq 2021-07-23 10:11:42 -04:00
parent f7454fabb3
commit 4b02e2b489
8 changed files with 38 additions and 28 deletions

View file

@ -36,6 +36,11 @@ enum class CPUAccuracy : u32 {
Unsafe = 2,
};
enum class FullscreenMode : u32 {
Borderless = 0,
Exclusive = 1,
};
/** The BasicSetting class is a simple resource manager. It defines a label and default value
* alongside the actual value of the setting for simpler and less-error prone use with frontend
* configurations. Setting a default value and label is required, though subclasses may deviate from
@ -313,11 +318,11 @@ struct Values {
Setting<u16> resolution_factor{1, "resolution_factor"};
// *nix platforms may have issues with the borderless windowed fullscreen mode.
// Default to exclusive fullscreen on these platforms for now.
Setting<int> fullscreen_mode{
Setting<FullscreenMode> fullscreen_mode{
#ifdef _WIN32
0,
FullscreenMode::Borderless,
#else
1,
FullscreenMode::Exclusive,
#endif
"fullscreen_mode"};
Setting<int> aspect_ratio{0, "aspect_ratio"};