summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_cp15.cpp11
-rw-r--r--src/core/core_timing.cpp4
-rw-r--r--src/core/core_timing.h2
-rw-r--r--src/core/cpu_manager.h8
-rw-r--r--src/core/loader/deconstructed_rom_directory.cpp4
-rw-r--r--src/core/loader/deconstructed_rom_directory.h11
-rw-r--r--src/core/memory/cheat_engine.cpp4
-rw-r--r--src/core/memory/cheat_engine.h2
-rw-r--r--src/core/tools/freezer.cpp4
-rw-r--r--src/core/tools/freezer.h2
10 files changed, 27 insertions, 25 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp
index caefc09f4..ebd506121 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp
@@ -94,12 +94,11 @@ CallbackOrAccessOneWord DynarmicCP15::CompileGetOneWord(bool two, unsigned opc1,
94CallbackOrAccessTwoWords DynarmicCP15::CompileGetTwoWords(bool two, unsigned opc, CoprocReg CRm) { 94CallbackOrAccessTwoWords DynarmicCP15::CompileGetTwoWords(bool two, unsigned opc, CoprocReg CRm) {
95 if (!two && opc == 0 && CRm == CoprocReg::C14) { 95 if (!two && opc == 0 && CRm == CoprocReg::C14) {
96 // CNTPCT 96 // CNTPCT
97 const auto callback = static_cast<u64 (*)(Dynarmic::A32::Jit*, void*, u32, u32)>( 97 const auto callback = [](Dynarmic::A32::Jit*, void* arg, u32, u32) -> u64 {
98 [](Dynarmic::A32::Jit*, void* arg, u32, u32) -> u64 { 98 const auto& parent_arg = *static_cast<ARM_Dynarmic_32*>(arg);
99 ARM_Dynarmic_32& parent = *(ARM_Dynarmic_32*)arg; 99 return parent_arg.system.CoreTiming().GetClockTicks();
100 return parent.system.CoreTiming().GetClockTicks(); 100 };
101 }); 101 return Callback{callback, &parent};
102 return Dynarmic::A32::Coprocessor::Callback{callback, (void*)&parent};
103 } 102 }
104 103
105 LOG_CRITICAL(Core_ARM, "CP15: mrrc{} p15, {}, <Rt>, <Rt2>, {}", two ? "2" : "", opc, CRm); 104 LOG_CRITICAL(Core_ARM, "CP15: mrrc{} p15, {}, <Rt>, <Rt2>, {}", two ? "2" : "", opc, CRm);
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 874b5673a..c2f0f609f 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -133,8 +133,8 @@ void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type,
133 } 133 }
134} 134}
135 135
136void CoreTiming::AddTicks(u64 ticks) { 136void CoreTiming::AddTicks(u64 ticks_to_add) {
137 this->ticks += ticks; 137 ticks += ticks_to_add;
138 downcount -= static_cast<s64>(ticks); 138 downcount -= static_cast<s64>(ticks);
139} 139}
140 140
diff --git a/src/core/core_timing.h b/src/core/core_timing.h
index 77ff4c6fe..b64caacda 100644
--- a/src/core/core_timing.h
+++ b/src/core/core_timing.h
@@ -102,7 +102,7 @@ public:
102 /// We only permit one event of each type in the queue at a time. 102 /// We only permit one event of each type in the queue at a time.
103 void RemoveEvent(const std::shared_ptr<EventType>& event_type); 103 void RemoveEvent(const std::shared_ptr<EventType>& event_type);
104 104
105 void AddTicks(u64 ticks); 105 void AddTicks(u64 ticks_to_add);
106 106
107 void ResetTicks(); 107 void ResetTicks();
108 108
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h
index 17420c941..9817017c0 100644
--- a/src/core/cpu_manager.h
+++ b/src/core/cpu_manager.h
@@ -35,13 +35,13 @@ public:
35 CpuManager& operator=(CpuManager&&) = delete; 35 CpuManager& operator=(CpuManager&&) = delete;
36 36
37 /// Sets if emulation is multicore or single core, must be set before Initialize 37 /// Sets if emulation is multicore or single core, must be set before Initialize
38 void SetMulticore(bool is_multicore) { 38 void SetMulticore(bool is_multi) {
39 this->is_multicore = is_multicore; 39 is_multicore = is_multi;
40 } 40 }
41 41
42 /// Sets if emulation is using an asynchronous GPU. 42 /// Sets if emulation is using an asynchronous GPU.
43 void SetAsyncGpu(bool is_async_gpu) { 43 void SetAsyncGpu(bool is_async) {
44 this->is_async_gpu = is_async_gpu; 44 is_async_gpu = is_async;
45 } 45 }
46 46
47 void Initialize(); 47 void Initialize();
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp
index ed776fc49..fed47ecda 100644
--- a/src/core/loader/deconstructed_rom_directory.cpp
+++ b/src/core/loader/deconstructed_rom_directory.cpp
@@ -79,8 +79,8 @@ AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(
79 : AppLoader(directory->GetFile("main")), dir(std::move(directory)), 79 : AppLoader(directory->GetFile("main")), dir(std::move(directory)),
80 override_update(override_update) {} 80 override_update(override_update) {}
81 81
82FileType AppLoader_DeconstructedRomDirectory::IdentifyType(const FileSys::VirtualFile& file) { 82FileType AppLoader_DeconstructedRomDirectory::IdentifyType(const FileSys::VirtualFile& dir_file) {
83 if (FileSys::IsDirectoryExeFS(file->GetContainingDirectory())) { 83 if (FileSys::IsDirectoryExeFS(dir_file->GetContainingDirectory())) {
84 return FileType::DeconstructedRomDirectory; 84 return FileType::DeconstructedRomDirectory;
85 } 85 }
86 86
diff --git a/src/core/loader/deconstructed_rom_directory.h b/src/core/loader/deconstructed_rom_directory.h
index c2b46e1bf..22a4ec5a6 100644
--- a/src/core/loader/deconstructed_rom_directory.h
+++ b/src/core/loader/deconstructed_rom_directory.h
@@ -31,11 +31,14 @@ public:
31 bool override_update = false); 31 bool override_update = false);
32 32
33 /** 33 /**
34 * Returns the type of the file 34 * Identifies whether or not the given file is a deconstructed ROM directory.
35 * @param file open file 35 *
36 * @return FileType found, or FileType::Error if this loader doesn't know it 36 * @param dir_file The file to verify.
37 *
38 * @return FileType::DeconstructedRomDirectory, or FileType::Error
39 * if the file is not a deconstructed ROM directory.
37 */ 40 */
38 static FileType IdentifyType(const FileSys::VirtualFile& file); 41 static FileType IdentifyType(const FileSys::VirtualFile& dir_file);
39 42
40 FileType GetFileType() const override { 43 FileType GetFileType() const override {
41 return IdentifyType(file); 44 return IdentifyType(file);
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp
index 8eec567ab..7643b7846 100644
--- a/src/core/memory/cheat_engine.cpp
+++ b/src/core/memory/cheat_engine.cpp
@@ -222,8 +222,8 @@ void CheatEngine::SetMainMemoryParameters(VAddr main_region_begin, u64 main_regi
222 }; 222 };
223} 223}
224 224
225void CheatEngine::Reload(std::vector<CheatEntry> cheats) { 225void CheatEngine::Reload(std::vector<CheatEntry> reload_cheats) {
226 this->cheats = std::move(cheats); 226 cheats = std::move(reload_cheats);
227 is_pending_reload.exchange(true); 227 is_pending_reload.exchange(true);
228} 228}
229 229
diff --git a/src/core/memory/cheat_engine.h b/src/core/memory/cheat_engine.h
index a31002346..5e6f901ec 100644
--- a/src/core/memory/cheat_engine.h
+++ b/src/core/memory/cheat_engine.h
@@ -68,7 +68,7 @@ public:
68 void Initialize(); 68 void Initialize();
69 void SetMainMemoryParameters(VAddr main_region_begin, u64 main_region_size); 69 void SetMainMemoryParameters(VAddr main_region_begin, u64 main_region_size);
70 70
71 void Reload(std::vector<CheatEntry> cheats); 71 void Reload(std::vector<CheatEntry> reload_cheats);
72 72
73private: 73private:
74 void FrameCallback(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); 74 void FrameCallback(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp
index 5c674a099..2e09faa6d 100644
--- a/src/core/tools/freezer.cpp
+++ b/src/core/tools/freezer.cpp
@@ -67,8 +67,8 @@ Freezer::~Freezer() {
67 core_timing.UnscheduleEvent(event, 0); 67 core_timing.UnscheduleEvent(event, 0);
68} 68}
69 69
70void Freezer::SetActive(bool active) { 70void Freezer::SetActive(bool is_active) {
71 if (!this->active.exchange(active)) { 71 if (!active.exchange(is_active)) {
72 FillEntryReads(); 72 FillEntryReads();
73 core_timing.ScheduleEvent(memory_freezer_ns, event); 73 core_timing.ScheduleEvent(memory_freezer_ns, event);
74 LOG_DEBUG(Common_Memory, "Memory freezer activated!"); 74 LOG_DEBUG(Common_Memory, "Memory freezer activated!");
diff --git a/src/core/tools/freezer.h b/src/core/tools/freezer.h
index 0fdb701a7..067134e93 100644
--- a/src/core/tools/freezer.h
+++ b/src/core/tools/freezer.h
@@ -43,7 +43,7 @@ public:
43 ~Freezer(); 43 ~Freezer();
44 44
45 // Enables or disables the entire memory freezer. 45 // Enables or disables the entire memory freezer.
46 void SetActive(bool active); 46 void SetActive(bool is_active);
47 47
48 // Returns whether or not the freezer is active. 48 // Returns whether or not the freezer is active.
49 bool IsActive() const; 49 bool IsActive() const;