mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-08 05:01:44 +00:00
dmnt: Fix debug log for cheats
This commit is contained in:
parent
000e382c42
commit
615f8a3ef3
1 changed files with 6 additions and 2 deletions
|
@ -46,8 +46,11 @@ namespace ams::dmnt::cheat::impl {
|
||||||
void CheatVirtualMachine::OpenDebugLogFile() {
|
void CheatVirtualMachine::OpenDebugLogFile() {
|
||||||
#ifdef DMNT_CHEAT_VM_DEBUG_LOG
|
#ifdef DMNT_CHEAT_VM_DEBUG_LOG
|
||||||
CloseDebugLogFile();
|
CloseDebugLogFile();
|
||||||
R_ABORT_UNLESS(fs::OpenFile(std::addressof(m_debug_log_file), "sdmc:/atmosphere/cheat_vm_logs/debug_log.txt"));
|
fs::EnsureDirectory("sdmc:/atmosphere/cheat_vm_logs");
|
||||||
|
fs::CreateFile("sdmc:/atmosphere/cheat_vm_logs/debug_log.txt", 0);
|
||||||
|
R_ABORT_UNLESS(fs::OpenFile(std::addressof(m_debug_log_file), "sdmc:/atmosphere/cheat_vm_logs/debug_log.txt", fs::OpenMode_Write | fs::OpenMode_AllowAppend));
|
||||||
m_debug_log_file_offset = 0;
|
m_debug_log_file_offset = 0;
|
||||||
|
m_has_debug_log_file = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +83,8 @@ namespace ams::dmnt::cheat::impl {
|
||||||
fmt_len += 1;
|
fmt_len += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs::WriteFile(m_debug_log_file, m_debug_log_offset, m_debug_log_format_buf, fmt_len, fs::WriteOption::Flush);
|
fs::WriteFile(m_debug_log_file, m_debug_log_file_offset, m_debug_log_format_buf, fmt_len, fs::WriteOption::Flush);
|
||||||
|
m_debug_log_file_offset += fmt_len;
|
||||||
#else
|
#else
|
||||||
AMS_UNUSED(format);
|
AMS_UNUSED(format);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue