core/core: Replace logging macros
This commit is contained in:
parent
8e02c70e82
commit
f407917eb7
@ -57,7 +57,7 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
|
|||||||
// If we don't have a currently active thread then don't execute instructions,
|
// If we don't have a currently active thread then don't execute instructions,
|
||||||
// instead advance to the next event and try to yield to the next thread
|
// instead advance to the next event and try to yield to the next thread
|
||||||
if (Kernel::GetCurrentThread() == nullptr) {
|
if (Kernel::GetCurrentThread() == nullptr) {
|
||||||
LOG_TRACE(Core_ARM11, "Idling");
|
NGLOG_TRACE(Core_ARM11, "Idling");
|
||||||
CoreTiming::Idle();
|
CoreTiming::Idle();
|
||||||
CoreTiming::Advance();
|
CoreTiming::Advance();
|
||||||
PrepareReschedule();
|
PrepareReschedule();
|
||||||
@ -84,14 +84,14 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
|
|||||||
app_loader = Loader::GetLoader(filepath);
|
app_loader = Loader::GetLoader(filepath);
|
||||||
|
|
||||||
if (!app_loader) {
|
if (!app_loader) {
|
||||||
LOG_CRITICAL(Core, "Failed to obtain loader for %s!", filepath.c_str());
|
NGLOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath);
|
||||||
return ResultStatus::ErrorGetLoader;
|
return ResultStatus::ErrorGetLoader;
|
||||||
}
|
}
|
||||||
std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode =
|
std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode =
|
||||||
app_loader->LoadKernelSystemMode();
|
app_loader->LoadKernelSystemMode();
|
||||||
|
|
||||||
if (system_mode.second != Loader::ResultStatus::Success) {
|
if (system_mode.second != Loader::ResultStatus::Success) {
|
||||||
LOG_CRITICAL(Core, "Failed to determine system mode (Error %i)!",
|
NGLOG_CRITICAL(Core, "Failed to determine system mode (Error {})!",
|
||||||
static_cast<int>(system_mode.second));
|
static_cast<int>(system_mode.second));
|
||||||
|
|
||||||
switch (system_mode.second) {
|
switch (system_mode.second) {
|
||||||
@ -106,7 +106,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
|
|||||||
|
|
||||||
ResultStatus init_result{Init(emu_window, system_mode.first.get())};
|
ResultStatus init_result{Init(emu_window, system_mode.first.get())};
|
||||||
if (init_result != ResultStatus::Success) {
|
if (init_result != ResultStatus::Success) {
|
||||||
LOG_CRITICAL(Core, "Failed to initialize system (Error %u)!",
|
NGLOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
|
||||||
static_cast<u32>(init_result));
|
static_cast<u32>(init_result));
|
||||||
System::Shutdown();
|
System::Shutdown();
|
||||||
return init_result;
|
return init_result;
|
||||||
@ -114,7 +114,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
|
|||||||
|
|
||||||
const Loader::ResultStatus load_result{app_loader->Load(Kernel::g_current_process)};
|
const Loader::ResultStatus load_result{app_loader->Load(Kernel::g_current_process)};
|
||||||
if (Loader::ResultStatus::Success != load_result) {
|
if (Loader::ResultStatus::Success != load_result) {
|
||||||
LOG_CRITICAL(Core, "Failed to load ROM (Error %u)!", static_cast<u32>(load_result));
|
NGLOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<u32>(load_result));
|
||||||
System::Shutdown();
|
System::Shutdown();
|
||||||
|
|
||||||
switch (load_result) {
|
switch (load_result) {
|
||||||
@ -150,7 +150,7 @@ void System::Reschedule() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
||||||
LOG_DEBUG(HW_Memory, "initialized OK");
|
NGLOG_DEBUG(HW_Memory, "initialized OK");
|
||||||
|
|
||||||
CoreTiming::Init();
|
CoreTiming::Init();
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
|||||||
cpu_core = std::make_unique<ARM_Dynarmic>(USER32MODE);
|
cpu_core = std::make_unique<ARM_Dynarmic>(USER32MODE);
|
||||||
#else
|
#else
|
||||||
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
||||||
LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
NGLOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
cpu_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
||||||
@ -182,7 +182,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
|
|||||||
return ResultStatus::ErrorVideoCore;
|
return ResultStatus::ErrorVideoCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Core, "Initialized OK");
|
NGLOG_DEBUG(Core, "Initialized OK");
|
||||||
|
|
||||||
// Reset counters and set time origin to current frame
|
// Reset counters and set time origin to current frame
|
||||||
GetAndResetPerfStats();
|
GetAndResetPerfStats();
|
||||||
@ -228,7 +228,7 @@ void System::Shutdown() {
|
|||||||
room_member->SendGameInfo(game_info);
|
room_member->SendGameInfo(game_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Core, "Shutdown OK");
|
NGLOG_DEBUG(Core, "Shutdown OK");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
Loading…
Reference in New Issue
Block a user