VERY experimental Nintendo Switch 2 emulator
C++
arm_interface: Get rid of GetTicks.
Lioncash8cf81643a968
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.hindex ef37ee0556..fe1e584ad8 100644--- a/src/core/arm/arm_interface.h+++ b/src/core/arm/arm_interface.h@@ -73,12 +73,6 @@ public:*/virtual void SetCPSR(u32 cpsr) = 0;- /**- * Returns the number of clock ticks since the last rese- * @return Returns number of clock ticks- */- virtual u64 GetTicks() const = 0;-/*** Advance the CPU core by the specified number of ticks (e.g. to simulate CPU execution time)* @param ticks Number of ticks to advance the CPU corediff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cppindex bbcbbdd2bb..cb1a410a02 100644--- a/src/core/arm/dyncom/arm_dyncom.cpp+++ b/src/core/arm/dyncom/arm_dyncom.cpp@@ -68,11 +68,6 @@ void ARM_DynCom::SetCPSR(u32 cpsr) {state->Cpsr = cpsr;}-u64 ARM_DynCom::GetTicks() const {- // TODO(Subv): Remove ARM_DynCom::GetTicks() and use CoreTiming::GetTicks() directly once ARMemu is gone- return CoreTiming::GetTicks();-}-void ARM_DynCom::AddTicks(u64 ticks) {down_count -= ticks;if (down_count < 0)diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.hindex 213cac1add..a7f95d3074 100644--- a/src/core/arm/dyncom/arm_dyncom.h+++ b/src/core/arm/dyncom/arm_dyncom.h@@ -23,7 +23,6 @@ public:u32 GetCPSR() const override;void SetCPSR(u32 cpsr) override;- u64 GetTicks() const override;void AddTicks(u64 ticks) override;void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg);diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cppindex e7f9bec7ef..8adb03f2ec 100644--- a/src/core/hle/service/hid/hid.cpp+++ b/src/core/hle/service/hid/hid.cpp@@ -7,7 +7,7 @@#include "core/hle/service/hid/hid_spvr.h"#include "core/hle/service/hid/hid_user.h"-#include "core/arm/arm_interface.h"+#include "core/core_timing.h"#include "core/hle/kernel/event.h"#include "core/hle/kernel/shared_memory.h"#include "core/hle/hle.h"@@ -82,7 +82,7 @@ void HIDUpdate() {// If we just updated index 0, provide a new timestampif (mem->pad.index == 0) {mem->pad.index_reset_ticks_previous = mem->pad.index_reset_ticks;- mem->pad.index_reset_ticks = (s64)Core::g_app_core->GetTicks();+ mem->pad.index_reset_ticks = (s64)CoreTiming::GetTicks();}mem->touch.index = next_touch_index;@@ -102,7 +102,7 @@ void HIDUpdate() {// If we just updated index 0, provide a new timestampif (mem->touch.index == 0) {mem->touch.index_reset_ticks_previous = mem->touch.index_reset_ticks;- mem->touch.index_reset_ticks = (s64)Core::g_app_core->GetTicks();+ mem->touch.index_reset_ticks = (s64)CoreTiming::GetTicks();}// Signal both handles when there's an update to Pad or touchdiff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cppindex 17385f9b2f..bbb4eb9cd6 100644--- a/src/core/hle/svc.cpp+++ b/src/core/hle/svc.cpp@@ -7,8 +7,9 @@#include "common/string_util.h"#include "common/symbols.h"-#include "core/arm/arm_interface.h"+#include "core/core_timing.h"#include "core/mem_map.h"+#include "core/arm/arm_interface.h"#include "core/hle/kernel/address_arbiter.h"#include "core/hle/kernel/event.h"@@ -551,7 +552,7 @@ static void SleepThread(s64 nanoseconds) {/// This returns the total CPU ticks elapsed since the CPU was powered-onstatic s64 GetSystemTick() {- return (s64)Core::g_app_core->GetTicks();+ return (s64)CoreTiming::GetTicks();}/// Creates a memory block at the specified address with the specified permissions and size