summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2018-06-18 18:22:31 +0200
committerGitHub <noreply@github.com>2018-06-18 18:22:31 +0200
commit091efcc41d59dbe0e478ea96f891c1b47b99ddde (patch)
tree8e5f651c4fd846026e5e787bb390d9740d2ee862 /Source/Core
parent29d51ff6927091261079135dde30fce1469460a6 (diff)
parentde9c5fd375dcc56bdce817b0bdefadb9f2bdac94 (diff)
Merge pull request #7125 from lioncash/enum
ConfigManager: Convert GPUDeterminismMode into an enum class
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/BootManager.cpp8
-rw-r--r--Source/Core/Core/ConfigManager.h12
-rw-r--r--Source/Core/VideoCommon/Fifo.cpp6
3 files changed, 13 insertions, 13 deletions
diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp
index 6040b2824f..f9848189f8 100644
--- a/Source/Core/Core/BootManager.cpp
+++ b/Source/Core/Core/BootManager.cpp
@@ -203,14 +203,14 @@ static ConfigCache config_cache;
static GPUDeterminismMode ParseGPUDeterminismMode(const std::string& mode)
{
if (mode == "auto")
- return GPU_DETERMINISM_AUTO;
+ return GPUDeterminismMode::Auto;
if (mode == "none")
- return GPU_DETERMINISM_NONE;
+ return GPUDeterminismMode::Disabled;
if (mode == "fake-completion")
- return GPU_DETERMINISM_FAKE_COMPLETION;
+ return GPUDeterminismMode::FakeCompletion;
NOTICE_LOG(BOOT, "Unknown GPU determinism mode %s", mode.c_str());
- return GPU_DETERMINISM_AUTO;
+ return GPUDeterminismMode::Auto;
}
// Boot the ISO or file
diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h
index a01fc64c09..287e9a098a 100644
--- a/Source/Core/Core/ConfigManager.h
+++ b/Source/Core/Core/ConfigManager.h
@@ -37,6 +37,8 @@ namespace PowerPC
enum class CPUCore;
} // namespace PowerPC
+struct BootParameters;
+
// DSP Backend Types
#define BACKEND_NULLSOUND _trans("No Audio Output")
#define BACKEND_ALSA "ALSA"
@@ -47,17 +49,15 @@ enum class CPUCore;
#define BACKEND_OPENSLES "OpenSLES"
#define BACKEND_WASAPI "WASAPI (Exclusive Mode)"
-enum GPUDeterminismMode
+enum class GPUDeterminismMode
{
- GPU_DETERMINISM_AUTO,
- GPU_DETERMINISM_NONE,
+ Auto,
+ Disabled,
// This is currently the only mode. There will probably be at least
// one more at some point.
- GPU_DETERMINISM_FAKE_COMPLETION,
+ FakeCompletion,
};
-struct BootParameters;
-
struct SConfig
{
// Wii Devices
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp
index 34f8def354..c0cbf234ab 100644
--- a/Source/Core/VideoCommon/Fifo.cpp
+++ b/Source/Core/VideoCommon/Fifo.cpp
@@ -498,13 +498,13 @@ void UpdateWantDeterminism(bool want)
bool gpu_thread = false;
switch (param.m_GPUDeterminismMode)
{
- case GPU_DETERMINISM_AUTO:
+ case GPUDeterminismMode::Auto:
gpu_thread = want;
break;
- case GPU_DETERMINISM_NONE:
+ case GPUDeterminismMode::Disabled:
gpu_thread = false;
break;
- case GPU_DETERMINISM_FAKE_COMPLETION:
+ case GPUDeterminismMode::FakeCompletion:
gpu_thread = true;
break;
}