From 54eb8c09f97e2addb6dc99c844e3aa6790f0a165 Mon Sep 17 00:00:00 2001 From: Chris Burgener Date: Tue, 5 Apr 2016 12:19:12 -0400 Subject: [PATCH 1/2] Remove Unused Framestop Functions --- Source/Core/Core/Movie.cpp | 12 ------------ Source/Core/Core/Movie.h | 1 - 2 files changed, 13 deletions(-) diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index 91ace55535..4a16eec594 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -44,7 +44,6 @@ static std::mutex cs_frameSkip; namespace Movie { static bool s_bFrameStep = false; -static bool s_bFrameStop = false; static bool s_bReadOnly = true; static u32 s_rerecords = 0; static PlayMode s_playMode = MODE_NONE; @@ -159,11 +158,6 @@ void FrameUpdate() s_bFrameStep = false; } - // ("framestop") the only purpose of this is to cause interpreter/jit Run() to return temporarily. - // after that we set it back to CPU_RUNNING and continue as normal. - if (s_bFrameStop) - *PowerPC::GetStatePtr() = PowerPC::CPU_STEPPING; - if (s_framesToSkip) FrameSkipping(); @@ -176,7 +170,6 @@ void Init() { s_bPolled = false; s_bFrameStep = false; - s_bFrameStop = false; s_bSaveConfig = false; s_iCPUCore = SConfig::GetInstance().iCPUCore; if (IsPlayingInput()) @@ -263,11 +256,6 @@ void DoFrameStep() } } -void SetFrameStopping(bool bEnabled) -{ - s_bFrameStop = bEnabled; -} - void SetReadOnly(bool bEnabled) { if (s_bReadOnly != bEnabled) diff --git a/Source/Core/Core/Movie.h b/Source/Core/Core/Movie.h index c7fe7e630c..416ffa9d0b 100644 --- a/Source/Core/Core/Movie.h +++ b/Source/Core/Core/Movie.h @@ -151,7 +151,6 @@ void ChangePads(bool instantly = false); void ChangeWiiPads(bool instantly = false); void DoFrameStep(); -void SetFrameStopping(bool bEnabled); void SetReadOnly(bool bEnabled); void SetFrameSkipping(unsigned int framesToSkip); From 3140f9b226d75a01f40f477dc5f0b63e8d692643 Mon Sep 17 00:00:00 2001 From: Chris Burgener Date: Tue, 5 Apr 2016 12:42:19 -0400 Subject: [PATCH 2/2] Change GetStatePtr() Return to const --- Source/Core/Core/PowerPC/PowerPC.cpp | 2 +- Source/Core/Core/PowerPC/PowerPC.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index d5ef266ede..d709708456 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -225,7 +225,7 @@ CPUState GetState() return state; } -volatile CPUState *GetStatePtr() +const volatile CPUState *GetStatePtr() { return &state; } diff --git a/Source/Core/Core/PowerPC/PowerPC.h b/Source/Core/Core/PowerPC/PowerPC.h index 2bddfb7955..71faf219b5 100644 --- a/Source/Core/Core/PowerPC/PowerPC.h +++ b/Source/Core/Core/PowerPC/PowerPC.h @@ -160,7 +160,7 @@ void Pause(); void Stop(); void FinishStateMove(); CPUState GetState(); -volatile CPUState *GetStatePtr(); // this oddity is here instead of an extern declaration to easily be able to find all direct accesses throughout the code. +const volatile CPUState *GetStatePtr(); // this oddity is here instead of an extern declaration to easily be able to find all direct accesses throughout the code. u32 CompactCR(); void ExpandCR(u32 cr);