Fix {Read,Write}FileToString.
We should be using binary always.
This commit is contained in:
1 parent
3f1ea21e4f
commit
e15f628935
12 files changed
+35
-58
No files matched your search
@@ -151,7 +151,7 @@ bool CBoot::Load_BS2(const std::string& _rBootROMFilename)
|
||||
|
||||
// Load the whole ROM dump
|
||||
std::string data;
|
||||
if (!File::ReadFileToString(false, _rBootROMFilename.c_str(), data))
|
||||
if (!File::ReadFileToString(_rBootROMFilename.c_str(), data))
|
||||
return false;
|
||||
|
||||
u32 ipl_hash = HashAdler32((const u8*)data.data(), data.size());
|
||||
|
||||
@@ -206,7 +206,7 @@ void BinaryStringBEToCode(const std::string &str, std::vector<u16> &code)
|
||||
bool LoadBinary(const char *filename, std::vector<u16> &code)
|
||||
{
|
||||
std::string buffer;
|
||||
if (!File::ReadFileToString(false, filename, buffer))
|
||||
if (!File::ReadFileToString(filename, buffer))
|
||||
return false;
|
||||
|
||||
BinaryStringBEToCode(buffer, code);
|
||||
@@ -217,7 +217,7 @@ bool SaveBinary(const std::vector<u16> &code, const char *filename)
|
||||
{
|
||||
std::string buffer;
|
||||
CodeToBinaryStringBE(code, buffer);
|
||||
if (!File::WriteStringToFile(false, buffer, filename))
|
||||
if (!File::WriteStringToFile(buffer, filename))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ bool DSPAssembler::Assemble(const char *text, std::vector<u16> &code, std::vecto
|
||||
if (line_numbers)
|
||||
line_numbers->clear();
|
||||
const char *fname = "tmp.asm";
|
||||
if (!File::WriteStringToFile(true, text, fname))
|
||||
if (!File::WriteStringToFile(text, fname))
|
||||
return false;
|
||||
InitPass(1);
|
||||
if (!AssembleFile(fname, 1))
|
||||
|
||||
@@ -145,7 +145,7 @@ bool InstallCodeHandler()
|
||||
u32 codelist_location = 0x800028B8; // Debugger on location (0x800022A8 = Debugger off, using codehandleronly.bin)
|
||||
std::string data;
|
||||
std::string _rCodeHandlerFilename = File::GetSysDirectory() + GECKO_CODE_HANDLER;
|
||||
if (!File::ReadFileToString(false, _rCodeHandlerFilename.c_str(), data))
|
||||
if (!File::ReadFileToString(_rCodeHandlerFilename.c_str(), data))
|
||||
return false;
|
||||
|
||||
// Install code handler
|
||||
|
||||
@@ -55,7 +55,7 @@ bool DumpDSPCode(const u8 *code_be, int size_in_bytes, u32 crc)
|
||||
if (!disasm.Disassemble(0, code, 0x0000, text))
|
||||
return false;
|
||||
|
||||
return File::WriteStringToFile(true, text, txtFile);
|
||||
return File::WriteStringToFile(text, txtFile);
|
||||
}
|
||||
|
||||
// TODO make this useful :p
|
||||
|
||||
Reference in new issue
Block a user