summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2016-07-13 18:56:23 +1200
committerGitHub <noreply@github.com>2016-07-13 18:56:23 +1200
commit3f9a98ddf2a77aa9ec2ed3d987cdf7aca25901b9 (patch)
treeec9dab9fd7f4ff07c789df6da9f89f9ecbde88ee /Source/Core
parentebf10d38ddc7367a4debb9987c0ef7f6ff152a12 (diff)
parentce9622c42652c0207801b5c20702569802a07f91 (diff)
Merge pull request #3979 from JosJuice/use-g_want_determinism
Use g_want_determinism more
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Core.cpp3
-rw-r--r--Source/Core/Core/HW/DSPLLE/DSPLLE.cpp9
-rw-r--r--Source/Core/Core/HW/EXI_DeviceIPL.cpp3
-rw-r--r--Source/Core/Core/HW/SI_DeviceGCAdapter.cpp10
-rw-r--r--Source/Core/DolphinWX/Config/ConfigMain.cpp3
-rw-r--r--Source/Core/DolphinWX/ControllerConfigDiag.cpp4
-rw-r--r--Source/Core/InputCommon/GCAdapter.cpp4
7 files changed, 18 insertions, 18 deletions
diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp
index 8916804cab..1670105285 100644
--- a/Source/Core/Core/Core.cpp
+++ b/Source/Core/Core/Core.cpp
@@ -977,8 +977,7 @@ void UpdateWantDeterminism(bool initial)
// For now, this value is not itself configurable. Instead, individual
// settings that depend on it, such as GPU determinism mode. should have
// override options for testing,
- bool new_want_determinism =
- Movie::IsPlayingInput() || Movie::IsRecordingInput() || NetPlay::IsNetPlayRunning();
+ bool new_want_determinism = Movie::IsMovieActive() || NetPlay::IsNetPlayRunning();
if (new_want_determinism != g_want_determinism || initial)
{
WARN_LOG(COMMON, "Want determinism <- %s", new_want_determinism ? "true" : "false");
diff --git a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp
index 70146c1eac..fad25fabb3 100644
--- a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp
+++ b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp
@@ -166,11 +166,9 @@ bool DSPLLE::Initialize(bool bWii, bool bDSPThread)
return false;
// needs to be after DSPCore_Init for the dspjit ptr
- if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() || Core::g_want_determinism ||
- !g_dsp_jit)
- {
+ if (Core::g_want_determinism || !g_dsp_jit)
bDSPThread = false;
- }
+
m_bWii = bWii;
m_bDSPThread = bDSPThread;
@@ -310,8 +308,7 @@ void DSPLLE::DSP_Update(int cycles)
*/
if (m_bDSPThread)
{
- if (requestDisableThread || NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() ||
- Core::g_want_determinism)
+ if (requestDisableThread || Core::g_want_determinism)
{
DSP_StopSoundStream();
m_bDSPThread = false;
diff --git a/Source/Core/Core/HW/EXI_DeviceIPL.cpp b/Source/Core/Core/HW/EXI_DeviceIPL.cpp
index 0938647c01..e66a8dc378 100644
--- a/Source/Core/Core/HW/EXI_DeviceIPL.cpp
+++ b/Source/Core/Core/HW/EXI_DeviceIPL.cpp
@@ -4,6 +4,7 @@
#include <cstring>
+#include "Common/Assert.h"
#include "Common/ChunkFile.h"
#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
@@ -12,6 +13,7 @@
#include "Common/MemoryUtil.h"
#include "Common/Timer.h"
#include "Core/ConfigManager.h"
+#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/HW/EXI_DeviceIPL.h"
#include "Core/HW/Sram.h"
@@ -421,6 +423,7 @@ u32 CEXIIPL::GetGCTime()
}
else
{
+ _assert_(!Core::g_want_determinism);
ltime = Common::Timer::GetLocalTimeSinceJan1970();
}
diff --git a/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp b/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp
index 280a85e465..35bc93e2fb 100644
--- a/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp
+++ b/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp
@@ -8,6 +8,7 @@
#include "Common/Logging/Log.h"
#include "Common/MsgHandler.h"
#include "Core/ConfigManager.h"
+#include "Core/Core.h"
#include "Core/HW/GCPad.h"
#include "Core/HW/SI_DeviceGCAdapter.h"
#include "Core/NetPlayProto.h"
@@ -41,12 +42,11 @@ GCPadStatus CSIDevice_GCAdapter::GetPadStatus()
int CSIDevice_GCAdapter::RunBuffer(u8* buffer, int length)
{
- if (!NetPlay::IsNetPlayRunning())
+ if (!Core::g_want_determinism)
{
- // The previous check is a hack to prevent a netplay desync due to
- // SI devices being different and returning different values on
- // RunBuffer(); the corresponding code in GCAdapter.cpp has the same
- // check.
+ // The previous check is a hack to prevent a desync due to SI devices
+ // being different and returning different values on RunBuffer();
+ // the corresponding code in GCAdapter.cpp has the same check.
// This returns an error value if there is no controller plugged
// into this port on the hardware gc adapter, exposing it to the game.
diff --git a/Source/Core/DolphinWX/Config/ConfigMain.cpp b/Source/Core/DolphinWX/Config/ConfigMain.cpp
index 3a62f7e97b..72d6f421ed 100644
--- a/Source/Core/DolphinWX/Config/ConfigMain.cpp
+++ b/Source/Core/DolphinWX/Config/ConfigMain.cpp
@@ -9,6 +9,7 @@
#include "Common/CommonTypes.h"
#include "Core/ConfigManager.h"
+#include "Core/Core.h"
#include "Core/Movie.h"
#include "Core/NetPlayProto.h"
#include "DolphinWX/Config/AdvancedConfigPane.h"
@@ -74,7 +75,7 @@ void CConfigMain::CreateGUIControls()
Notebook->AddPage(wii_pane, _("Wii"));
Notebook->AddPage(path_pane, _("Paths"));
Notebook->AddPage(advanced_pane, _("Advanced"));
- if (Movie::IsMovieActive() || NetPlay::IsNetPlayRunning())
+ if (Core::g_want_determinism)
advanced_pane->Disable();
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp
index 8a0de34024..3d8d12bbef 100644
--- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp
+++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp
@@ -98,7 +98,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer()
pad_type_choices[i]->Bind(wxEVT_CHOICE, &ControllerConfigDiag::OnGameCubePortChanged, this);
// Disable controller type selection for certain circumstances.
- if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive())
+ if (Core::g_want_determinism)
pad_type_choices[i]->Disable();
// Set the saved pad type as the default choice.
@@ -179,7 +179,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer()
// Disable controller type selection for certain circumstances.
bool wii_game_started =
SConfig::GetInstance().bWii || Core::GetState() == Core::CORE_UNINITIALIZED;
- if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() || !wii_game_started)
+ if (Core::g_want_determinism || !wii_game_started)
wiimote_source_ch[i]->Disable();
m_orig_wiimote_sources[i] = g_wiimote_sources[i];
diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp
index b86b0aa4c5..7c450d4288 100644
--- a/Source/Core/InputCommon/GCAdapter.cpp
+++ b/Source/Core/InputCommon/GCAdapter.cpp
@@ -453,9 +453,9 @@ void Input(int chan, GCPadStatus* pad)
pad->triggerLeft = controller_payload_copy[1 + (9 * chan) + 7];
pad->triggerRight = controller_payload_copy[1 + (9 * chan) + 8];
}
- else if (!NetPlay::IsNetPlayRunning())
+ else if (!Core::g_want_determinism)
{
- // This is a hack to prevent a netplay desync due to SI devices
+ // This is a hack to prevent a desync due to SI devices
// being different and returning different values.
// The corresponding code in DeviceGCAdapter has the same check
pad->button = PAD_ERR_STATUS;