summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-07 17:11:11 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-21 01:22:53 +0200
commited82fa3a91fc84f7f906b898d8f71e15fb42c16e (patch)
tree4cacf3974405b80f64b5108481ea198fd08f4aee
parentfreezer: Add documentation for methods (diff)
downloadyuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.tar
yuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.tar.gz
yuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.tar.bz2
yuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.tar.lz
yuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.tar.xz
yuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.tar.zst
yuzu-ed82fa3a91fc84f7f906b898d8f71e15fb42c16e.zip
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/core.cpp4
-rw-r--r--src/core/tools/freezer.cpp (renamed from src/core/memory/freezer.cpp)22
-rw-r--r--src/core/tools/freezer.h (renamed from src/core/memory/freezer.h)4
4 files changed, 17 insertions, 17 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index c17528134..59b64407a 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -454,8 +454,6 @@ add_library(core STATIC
loader/nsp.h
loader/xci.cpp
loader/xci.h
- memory/freezer.cpp
- memory/freezer.h
memory.cpp
memory.h
memory_setup.h
@@ -465,6 +463,8 @@ add_library(core STATIC
settings.h
telemetry_session.cpp
telemetry_session.h
+ tools/freezer.cpp
+ tools/freezer.h
)
create_target_directory_groups(core)
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 94ebe0995..48d953442 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -28,10 +28,10 @@
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
#include "core/loader/loader.h"
-#include "core/memory/freezer.h"
#include "core/perf_stats.h"
#include "core/settings.h"
#include "core/telemetry_session.h"
+#include "core/tools/freezer.h"
#include "file_sys/cheat_engine.h"
#include "video_core/debug_utils/debug_utils.h"
#include "video_core/renderer_base.h"
@@ -244,7 +244,7 @@ struct System::Impl {
bool is_powered_on = false;
std::unique_ptr<FileSys::CheatEngine> cheat_engine;
- std::unique_ptr<Memory::Freezer> memory_freezer;
+ std::unique_ptr<Tools::Freezer> memory_freezer;
/// Frontend applets
Service::AM::Applets::AppletManager applet_manager;
diff --git a/src/core/memory/freezer.cpp b/src/core/tools/freezer.cpp
index 6b20e8388..17f050068 100644
--- a/src/core/memory/freezer.cpp
+++ b/src/core/tools/freezer.cpp
@@ -8,9 +8,9 @@
#include "core/core_timing.h"
#include "core/core_timing_util.h"
#include "core/memory.h"
-#include "core/memory/freezer.h"
+#include "core/tools/freezer.h"
-namespace Memory {
+namespace Tools {
namespace {
@@ -19,13 +19,13 @@ constexpr s64 MEMORY_FREEZER_TICKS = static_cast<s64>(Core::Timing::BASE_CLOCK_R
u64 MemoryReadWidth(u32 width, VAddr addr) {
switch (width) {
case 1:
- return Read8(addr);
+ return Memory::Read8(addr);
case 2:
- return Read16(addr);
+ return Memory::Read16(addr);
case 4:
- return Read32(addr);
+ return Memory::Read32(addr);
case 8:
- return Read64(addr);
+ return Memory::Read64(addr);
default:
UNREACHABLE();
return 0;
@@ -35,16 +35,16 @@ u64 MemoryReadWidth(u32 width, VAddr addr) {
void MemoryWriteWidth(u32 width, VAddr addr, u64 value) {
switch (width) {
case 1:
- Write8(addr, static_cast<u8>(value));
+ Memory::Write8(addr, static_cast<u8>(value));
break;
case 2:
- Write16(addr, static_cast<u16>(value));
+ Memory::Write16(addr, static_cast<u16>(value));
break;
case 4:
- Write32(addr, static_cast<u32>(value));
+ Memory::Write32(addr, static_cast<u32>(value));
break;
case 8:
- Write64(addr, value);
+ Memory::Write64(addr, value);
break;
default:
UNREACHABLE();
@@ -185,4 +185,4 @@ void Freezer::FillEntryReads() {
}
}
-} // namespace Memory
+} // namespace Tools
diff --git a/src/core/memory/freezer.h b/src/core/tools/freezer.h
index b0c610039..5edd049c1 100644
--- a/src/core/memory/freezer.h
+++ b/src/core/tools/freezer.h
@@ -15,7 +15,7 @@ class CoreTiming;
struct EventType;
} // namespace Core::Timing
-namespace Memory {
+namespace Tools {
// A class that will effectively freeze memory values.
class Freezer {
@@ -72,4 +72,4 @@ private:
Core::Timing::CoreTiming& core_timing;
};
-} // namespace Memory
+} // namespace Tools