diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 4 | ||||
| -rw-r--r-- | src/core/core.cpp | 22 | ||||
| -rw-r--r-- | src/core/core_timing.h | 16 | ||||
| -rw-r--r-- | src/core/frontend/input.h | 6 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 6 | ||||
| -rw-r--r-- | src/core/tracer/recorder.cpp | 2 |
6 files changed, 28 insertions, 28 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 6afad0e0c..3078b64ef 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp | |||
| @@ -55,8 +55,8 @@ public: | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | void InterpreterFallback(u64 pc, size_t num_instructions) override { | 57 | void InterpreterFallback(u64 pc, size_t num_instructions) override { |
| 58 | LOG_INFO(Core_ARM, "Unicorn fallback @ 0x%" PRIx64 " for %zu instructions (instr = %08x)", | 58 | NGLOG_INFO(Core_ARM, "Unicorn fallback @ {:#X} for {} instructions (instr = {:08X})", pc, |
| 59 | pc, num_instructions, MemoryReadCode(pc)); | 59 | num_instructions, MemoryReadCode(pc)); |
| 60 | 60 | ||
| 61 | ARM_Interface::ThreadContext ctx; | 61 | ARM_Interface::ThreadContext ctx; |
| 62 | parent.SaveContext(ctx); | 62 | parent.SaveContext(ctx); |
diff --git a/src/core/core.cpp b/src/core/core.cpp index ee4af4dcc..9e2229d02 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -55,7 +55,7 @@ System::ResultStatus System::RunLoop(bool tight_loop) { | |||
| 55 | // If we don't have a currently active thread then don't execute instructions, | 55 | // If we don't have a currently active thread then don't execute instructions, |
| 56 | // instead advance to the next event and try to yield to the next thread | 56 | // instead advance to the next event and try to yield to the next thread |
| 57 | if (Kernel::GetCurrentThread() == nullptr) { | 57 | if (Kernel::GetCurrentThread() == nullptr) { |
| 58 | LOG_TRACE(Core_ARM, "Idling"); | 58 | NGLOG_TRACE(Core_ARM, "Idling"); |
| 59 | CoreTiming::Idle(); | 59 | CoreTiming::Idle(); |
| 60 | CoreTiming::Advance(); | 60 | CoreTiming::Advance(); |
| 61 | PrepareReschedule(); | 61 | PrepareReschedule(); |
| @@ -82,15 +82,15 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 82 | app_loader = Loader::GetLoader(filepath); | 82 | app_loader = Loader::GetLoader(filepath); |
| 83 | 83 | ||
| 84 | if (!app_loader) { | 84 | if (!app_loader) { |
| 85 | LOG_CRITICAL(Core, "Failed to obtain loader for %s!", filepath.c_str()); | 85 | NGLOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); |
| 86 | return ResultStatus::ErrorGetLoader; | 86 | return ResultStatus::ErrorGetLoader; |
| 87 | } | 87 | } |
| 88 | std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode = | 88 | std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode = |
| 89 | app_loader->LoadKernelSystemMode(); | 89 | app_loader->LoadKernelSystemMode(); |
| 90 | 90 | ||
| 91 | if (system_mode.second != Loader::ResultStatus::Success) { | 91 | if (system_mode.second != Loader::ResultStatus::Success) { |
| 92 | LOG_CRITICAL(Core, "Failed to determine system mode (Error %i)!", | 92 | NGLOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", |
| 93 | static_cast<int>(system_mode.second)); | 93 | static_cast<int>(system_mode.second)); |
| 94 | 94 | ||
| 95 | switch (system_mode.second) { | 95 | switch (system_mode.second) { |
| 96 | case Loader::ResultStatus::ErrorEncrypted: | 96 | case Loader::ResultStatus::ErrorEncrypted: |
| @@ -106,15 +106,15 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 106 | 106 | ||
| 107 | ResultStatus init_result{Init(emu_window, system_mode.first.get())}; | 107 | ResultStatus init_result{Init(emu_window, system_mode.first.get())}; |
| 108 | if (init_result != ResultStatus::Success) { | 108 | if (init_result != ResultStatus::Success) { |
| 109 | LOG_CRITICAL(Core, "Failed to initialize system (Error %i)!", | 109 | NGLOG_CRITICAL(Core, "Failed to initialize system (Error {})!", |
| 110 | static_cast<int>(init_result)); | 110 | static_cast<int>(init_result)); |
| 111 | System::Shutdown(); | 111 | System::Shutdown(); |
| 112 | return init_result; | 112 | return init_result; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | const Loader::ResultStatus load_result{app_loader->Load(current_process)}; | 115 | const Loader::ResultStatus load_result{app_loader->Load(current_process)}; |
| 116 | if (Loader::ResultStatus::Success != load_result) { | 116 | if (Loader::ResultStatus::Success != load_result) { |
| 117 | LOG_CRITICAL(Core, "Failed to load ROM (Error %i)!", static_cast<int>(load_result)); | 117 | NGLOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result)); |
| 118 | System::Shutdown(); | 118 | System::Shutdown(); |
| 119 | 119 | ||
| 120 | switch (load_result) { | 120 | switch (load_result) { |
| @@ -151,7 +151,7 @@ void System::Reschedule() { | |||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | 153 | System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { |
| 154 | LOG_DEBUG(HW_Memory, "initialized OK"); | 154 | NGLOG_DEBUG(HW_Memory, "initialized OK"); |
| 155 | 155 | ||
| 156 | CoreTiming::Init(); | 156 | CoreTiming::Init(); |
| 157 | 157 | ||
| @@ -162,7 +162,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 162 | cpu_core = std::make_shared<ARM_Dynarmic>(); | 162 | cpu_core = std::make_shared<ARM_Dynarmic>(); |
| 163 | #else | 163 | #else |
| 164 | cpu_core = std::make_shared<ARM_Unicorn>(); | 164 | cpu_core = std::make_shared<ARM_Unicorn>(); |
| 165 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | 165 | NGLOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); |
| 166 | #endif | 166 | #endif |
| 167 | } else { | 167 | } else { |
| 168 | cpu_core = std::make_shared<ARM_Unicorn>(); | 168 | cpu_core = std::make_shared<ARM_Unicorn>(); |
| @@ -184,7 +184,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 184 | return ResultStatus::ErrorVideoCore; | 184 | return ResultStatus::ErrorVideoCore; |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | LOG_DEBUG(Core, "Initialized OK"); | 187 | NGLOG_DEBUG(Core, "Initialized OK"); |
| 188 | 188 | ||
| 189 | // Reset counters and set time origin to current frame | 189 | // Reset counters and set time origin to current frame |
| 190 | GetAndResetPerfStats(); | 190 | GetAndResetPerfStats(); |
| @@ -218,7 +218,7 @@ void System::Shutdown() { | |||
| 218 | 218 | ||
| 219 | app_loader.reset(); | 219 | app_loader.reset(); |
| 220 | 220 | ||
| 221 | LOG_DEBUG(Core, "Shutdown OK"); | 221 | NGLOG_DEBUG(Core, "Shutdown OK"); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | Service::SM::ServiceManager& System::ServiceManager() { | 224 | Service::SM::ServiceManager& System::ServiceManager() { |
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index b9eb38ea4..26e4b1134 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h | |||
| @@ -51,11 +51,11 @@ inline s64 usToCycles(int us) { | |||
| 51 | 51 | ||
| 52 | inline s64 usToCycles(s64 us) { | 52 | inline s64 usToCycles(s64 us) { |
| 53 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | 53 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |
| 54 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 54 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 55 | return std::numeric_limits<s64>::max(); | 55 | return std::numeric_limits<s64>::max(); |
| 56 | } | 56 | } |
| 57 | if (us > MAX_VALUE_TO_MULTIPLY) { | 57 | if (us > MAX_VALUE_TO_MULTIPLY) { |
| 58 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 58 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 59 | return BASE_CLOCK_RATE * (us / 1000000); | 59 | return BASE_CLOCK_RATE * (us / 1000000); |
| 60 | } | 60 | } |
| 61 | return (BASE_CLOCK_RATE * us) / 1000000; | 61 | return (BASE_CLOCK_RATE * us) / 1000000; |
| @@ -63,11 +63,11 @@ inline s64 usToCycles(s64 us) { | |||
| 63 | 63 | ||
| 64 | inline s64 usToCycles(u64 us) { | 64 | inline s64 usToCycles(u64 us) { |
| 65 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | 65 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |
| 66 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 66 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 67 | return std::numeric_limits<s64>::max(); | 67 | return std::numeric_limits<s64>::max(); |
| 68 | } | 68 | } |
| 69 | if (us > MAX_VALUE_TO_MULTIPLY) { | 69 | if (us > MAX_VALUE_TO_MULTIPLY) { |
| 70 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 70 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 71 | return BASE_CLOCK_RATE * static_cast<s64>(us / 1000000); | 71 | return BASE_CLOCK_RATE * static_cast<s64>(us / 1000000); |
| 72 | } | 72 | } |
| 73 | return (BASE_CLOCK_RATE * static_cast<s64>(us)) / 1000000; | 73 | return (BASE_CLOCK_RATE * static_cast<s64>(us)) / 1000000; |
| @@ -83,11 +83,11 @@ inline s64 nsToCycles(int ns) { | |||
| 83 | 83 | ||
| 84 | inline s64 nsToCycles(s64 ns) { | 84 | inline s64 nsToCycles(s64 ns) { |
| 85 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | 85 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |
| 86 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 86 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 87 | return std::numeric_limits<s64>::max(); | 87 | return std::numeric_limits<s64>::max(); |
| 88 | } | 88 | } |
| 89 | if (ns > MAX_VALUE_TO_MULTIPLY) { | 89 | if (ns > MAX_VALUE_TO_MULTIPLY) { |
| 90 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 90 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 91 | return BASE_CLOCK_RATE * (ns / 1000000000); | 91 | return BASE_CLOCK_RATE * (ns / 1000000000); |
| 92 | } | 92 | } |
| 93 | return (BASE_CLOCK_RATE * ns) / 1000000000; | 93 | return (BASE_CLOCK_RATE * ns) / 1000000000; |
| @@ -95,11 +95,11 @@ inline s64 nsToCycles(s64 ns) { | |||
| 95 | 95 | ||
| 96 | inline s64 nsToCycles(u64 ns) { | 96 | inline s64 nsToCycles(u64 ns) { |
| 97 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | 97 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |
| 98 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 98 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 99 | return std::numeric_limits<s64>::max(); | 99 | return std::numeric_limits<s64>::max(); |
| 100 | } | 100 | } |
| 101 | if (ns > MAX_VALUE_TO_MULTIPLY) { | 101 | if (ns > MAX_VALUE_TO_MULTIPLY) { |
| 102 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 102 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 103 | return BASE_CLOCK_RATE * (static_cast<s64>(ns) / 1000000000); | 103 | return BASE_CLOCK_RATE * (static_cast<s64>(ns) / 1000000000); |
| 104 | } | 104 | } |
| 105 | return (BASE_CLOCK_RATE * static_cast<s64>(ns)) / 1000000000; | 105 | return (BASE_CLOCK_RATE * static_cast<s64>(ns)) / 1000000000; |
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index 8c256beb5..79e52488f 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h | |||
| @@ -59,7 +59,7 @@ template <typename InputDeviceType> | |||
| 59 | void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDeviceType>> factory) { | 59 | void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDeviceType>> factory) { |
| 60 | auto pair = std::make_pair(name, std::move(factory)); | 60 | auto pair = std::make_pair(name, std::move(factory)); |
| 61 | if (!Impl::FactoryList<InputDeviceType>::list.insert(std::move(pair)).second) { | 61 | if (!Impl::FactoryList<InputDeviceType>::list.insert(std::move(pair)).second) { |
| 62 | LOG_ERROR(Input, "Factory %s already registered", name.c_str()); | 62 | NGLOG_ERROR(Input, "Factory '{}' already registered", name); |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 | ||
| @@ -71,7 +71,7 @@ void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDevic | |||
| 71 | template <typename InputDeviceType> | 71 | template <typename InputDeviceType> |
| 72 | void UnregisterFactory(const std::string& name) { | 72 | void UnregisterFactory(const std::string& name) { |
| 73 | if (Impl::FactoryList<InputDeviceType>::list.erase(name) == 0) { | 73 | if (Impl::FactoryList<InputDeviceType>::list.erase(name) == 0) { |
| 74 | LOG_ERROR(Input, "Factory %s not registered", name.c_str()); | 74 | NGLOG_ERROR(Input, "Factory '{}' not registered", name); |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -88,7 +88,7 @@ std::unique_ptr<InputDeviceType> CreateDevice(const std::string& params) { | |||
| 88 | const auto pair = factory_list.find(engine); | 88 | const auto pair = factory_list.find(engine); |
| 89 | if (pair == factory_list.end()) { | 89 | if (pair == factory_list.end()) { |
| 90 | if (engine != "null") { | 90 | if (engine != "null") { |
| 91 | LOG_ERROR(Input, "Unknown engine name: %s", engine.c_str()); | 91 | NGLOG_ERROR(Input, "Unknown engine name: {}", engine); |
| 92 | } | 92 | } |
| 93 | return std::make_unique<InputDeviceType>(); | 93 | return std::make_unique<InputDeviceType>(); |
| 94 | } | 94 | } |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index cecf0a5cb..02c52bb55 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -42,14 +42,14 @@ u64 GetTelemetryId() { | |||
| 42 | if (FileUtil::Exists(filename)) { | 42 | if (FileUtil::Exists(filename)) { |
| 43 | FileUtil::IOFile file(filename, "rb"); | 43 | FileUtil::IOFile file(filename, "rb"); |
| 44 | if (!file.IsOpen()) { | 44 | if (!file.IsOpen()) { |
| 45 | LOG_ERROR(Core, "failed to open telemetry_id: %s", filename.c_str()); | 45 | NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); |
| 46 | return {}; | 46 | return {}; |
| 47 | } | 47 | } |
| 48 | file.ReadBytes(&telemetry_id, sizeof(u64)); | 48 | file.ReadBytes(&telemetry_id, sizeof(u64)); |
| 49 | } else { | 49 | } else { |
| 50 | FileUtil::IOFile file(filename, "wb"); | 50 | FileUtil::IOFile file(filename, "wb"); |
| 51 | if (!file.IsOpen()) { | 51 | if (!file.IsOpen()) { |
| 52 | LOG_ERROR(Core, "failed to open telemetry_id: %s", filename.c_str()); | 52 | NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); |
| 53 | return {}; | 53 | return {}; |
| 54 | } | 54 | } |
| 55 | telemetry_id = GenerateTelemetryId(); | 55 | telemetry_id = GenerateTelemetryId(); |
| @@ -65,7 +65,7 @@ u64 RegenerateTelemetryId() { | |||
| 65 | 65 | ||
| 66 | FileUtil::IOFile file(filename, "wb"); | 66 | FileUtil::IOFile file(filename, "wb"); |
| 67 | if (!file.IsOpen()) { | 67 | if (!file.IsOpen()) { |
| 68 | LOG_ERROR(Core, "failed to open telemetry_id: %s", filename.c_str()); | 68 | NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); |
| 69 | return {}; | 69 | return {}; |
| 70 | } | 70 | } |
| 71 | file.WriteBytes(&new_telemetry_id, sizeof(u64)); | 71 | file.WriteBytes(&new_telemetry_id, sizeof(u64)); |
diff --git a/src/core/tracer/recorder.cpp b/src/core/tracer/recorder.cpp index f3b0d6a8f..2f848c994 100644 --- a/src/core/tracer/recorder.cpp +++ b/src/core/tracer/recorder.cpp | |||
| @@ -159,7 +159,7 @@ void Recorder::Finish(const std::string& filename) { | |||
| 159 | throw "Failed to write stream element"; | 159 | throw "Failed to write stream element"; |
| 160 | } | 160 | } |
| 161 | } catch (const char* str) { | 161 | } catch (const char* str) { |
| 162 | LOG_ERROR(HW_GPU, "Writing CiTrace file failed: %s", str); | 162 | NGLOG_ERROR(HW_GPU, "Writing CiTrace file failed: {}", str); |
| 163 | } | 163 | } |
| 164 | } | 164 | } |
| 165 | 165 | ||