Merge pull request #7125 from lioncash/enum
ConfigManager: Convert GPUDeterminismMode into an enum class
This commit is contained in:
commit
091efcc41d
|
@ -203,14 +203,14 @@ static ConfigCache config_cache;
|
||||||
static GPUDeterminismMode ParseGPUDeterminismMode(const std::string& mode)
|
static GPUDeterminismMode ParseGPUDeterminismMode(const std::string& mode)
|
||||||
{
|
{
|
||||||
if (mode == "auto")
|
if (mode == "auto")
|
||||||
return GPU_DETERMINISM_AUTO;
|
return GPUDeterminismMode::Auto;
|
||||||
if (mode == "none")
|
if (mode == "none")
|
||||||
return GPU_DETERMINISM_NONE;
|
return GPUDeterminismMode::Disabled;
|
||||||
if (mode == "fake-completion")
|
if (mode == "fake-completion")
|
||||||
return GPU_DETERMINISM_FAKE_COMPLETION;
|
return GPUDeterminismMode::FakeCompletion;
|
||||||
|
|
||||||
NOTICE_LOG(BOOT, "Unknown GPU determinism mode %s", mode.c_str());
|
NOTICE_LOG(BOOT, "Unknown GPU determinism mode %s", mode.c_str());
|
||||||
return GPU_DETERMINISM_AUTO;
|
return GPUDeterminismMode::Auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Boot the ISO or file
|
// Boot the ISO or file
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace PowerPC
|
||||||
enum class CPUCore;
|
enum class CPUCore;
|
||||||
} // namespace PowerPC
|
} // namespace PowerPC
|
||||||
|
|
||||||
|
struct BootParameters;
|
||||||
|
|
||||||
// DSP Backend Types
|
// DSP Backend Types
|
||||||
#define BACKEND_NULLSOUND _trans("No Audio Output")
|
#define BACKEND_NULLSOUND _trans("No Audio Output")
|
||||||
#define BACKEND_ALSA "ALSA"
|
#define BACKEND_ALSA "ALSA"
|
||||||
|
@ -47,17 +49,15 @@ enum class CPUCore;
|
||||||
#define BACKEND_OPENSLES "OpenSLES"
|
#define BACKEND_OPENSLES "OpenSLES"
|
||||||
#define BACKEND_WASAPI "WASAPI (Exclusive Mode)"
|
#define BACKEND_WASAPI "WASAPI (Exclusive Mode)"
|
||||||
|
|
||||||
enum GPUDeterminismMode
|
enum class GPUDeterminismMode
|
||||||
{
|
{
|
||||||
GPU_DETERMINISM_AUTO,
|
Auto,
|
||||||
GPU_DETERMINISM_NONE,
|
Disabled,
|
||||||
// This is currently the only mode. There will probably be at least
|
// This is currently the only mode. There will probably be at least
|
||||||
// one more at some point.
|
// one more at some point.
|
||||||
GPU_DETERMINISM_FAKE_COMPLETION,
|
FakeCompletion,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BootParameters;
|
|
||||||
|
|
||||||
struct SConfig
|
struct SConfig
|
||||||
{
|
{
|
||||||
// Wii Devices
|
// Wii Devices
|
||||||
|
|
|
@ -498,13 +498,13 @@ void UpdateWantDeterminism(bool want)
|
||||||
bool gpu_thread = false;
|
bool gpu_thread = false;
|
||||||
switch (param.m_GPUDeterminismMode)
|
switch (param.m_GPUDeterminismMode)
|
||||||
{
|
{
|
||||||
case GPU_DETERMINISM_AUTO:
|
case GPUDeterminismMode::Auto:
|
||||||
gpu_thread = want;
|
gpu_thread = want;
|
||||||
break;
|
break;
|
||||||
case GPU_DETERMINISM_NONE:
|
case GPUDeterminismMode::Disabled:
|
||||||
gpu_thread = false;
|
gpu_thread = false;
|
||||||
break;
|
break;
|
||||||
case GPU_DETERMINISM_FAKE_COMPLETION:
|
case GPUDeterminismMode::FakeCompletion:
|
||||||
gpu_thread = true;
|
gpu_thread = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue