mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-28 07:05:41 +00:00
core: Move Freezer class to tools namespace
This commit is contained in:
parent
c9983ad9a7
commit
ed82fa3a91
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue