Merge pull request #3979 from JosJuice/use-g_want_determinism

Use g_want_determinism more
This commit is contained in:
Matthew Parlane 2016-07-13 18:56:23 +12:00 committed by GitHub
commit 3f9a98ddf2
7 changed files with 18 additions and 18 deletions

View file

@ -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");

View file

@ -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;

View file

@ -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();
}

View file

@ -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.

View file

@ -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);

View file

@ -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];

View file

@ -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;