Added fs::file_ptr, fom::rewrite, cleanup

This commit is contained in:
Nekotekina 2015-11-01 13:33:28 +03:00
parent 009aa3dcb9
commit a4db58f5f2
19 changed files with 130 additions and 54 deletions

View file

@ -33,9 +33,7 @@ spu_recompiler::spu_recompiler()
LOG_SUCCESS(SPU, "SPU Recompiler (ASMJIT) created...");
const std::string str = fmt::format("SPU JIT initialization...\n\nTitle: %s\nTitle ID: %s\n\n", Emu.GetTitle().c_str(), Emu.GetTitleID().c_str());
fs::file("SPUJIT.log", fom::write | fom::create | fom::trunc).write(str.c_str(), str.size());
fs::file("SPUJIT.log", fom::rewrite) << fmt::format("SPU JIT initialization...\n\nTitle: %s\nTitle ID: %s\n\n", Emu.GetTitle().c_str(), Emu.GetTitleID().c_str());
}
void spu_recompiler::compile(spu_function_t& f)
@ -220,7 +218,7 @@ void spu_recompiler::compile(spu_function_t& f)
log += "\n\n\n";
// Append log file
fs::file("SPUJIT.log", fom::write | fom::append | fom::create).write(log.c_str(), log.size());
fs::file("SPUJIT.log", fom::write | fom::append) << log;
}
spu_recompiler::XmmLink spu_recompiler::XmmAlloc() // get empty xmm register