mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 23:15:18 +00:00
wxFile removed (rFile -> rfile_t)
This commit is contained in:
parent
2cafa84b75
commit
ab405901ee
43 changed files with 814 additions and 973 deletions
|
|
@ -73,22 +73,20 @@ void AutoPauseManagerDialog::LoadEntries(void)
|
|||
|
||||
if (rExists("pause.bin"))
|
||||
{
|
||||
rFile list;
|
||||
list.Open("pause.bin", rFile::read);
|
||||
rfile_t list("pause.bin");
|
||||
//System calls ID and Function calls ID are all u32 iirc.
|
||||
u32 num;
|
||||
size_t fmax = list.Length();
|
||||
size_t fmax = list.size();
|
||||
size_t fcur = 0;
|
||||
list.Seek(0);
|
||||
list.seek(0);
|
||||
while (fcur <= fmax - sizeof(u32))
|
||||
{
|
||||
list.Read(&num, sizeof(u32));
|
||||
list.read(&num, sizeof(u32));
|
||||
fcur += sizeof(u32);
|
||||
if (num == 0xFFFFFFFF) break;
|
||||
|
||||
m_entries.emplace_back(num);
|
||||
}
|
||||
list.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,24 +95,18 @@ void AutoPauseManagerDialog::LoadEntries(void)
|
|||
//This would always use a 0xFFFFFFFF as end of the pause.bin
|
||||
void AutoPauseManagerDialog::SaveEntries(void)
|
||||
{
|
||||
if (rExists("pause.bin"))
|
||||
{
|
||||
rRemoveFile("pause.bin");
|
||||
}
|
||||
rFile list;
|
||||
list.Open("pause.bin", rFile::write);
|
||||
rfile_t list("pause.bin", o_write | o_create | o_trunc);
|
||||
//System calls ID and Function calls ID are all u32 iirc.
|
||||
u32 num = 0;
|
||||
list.Seek(0);
|
||||
list.seek(0);
|
||||
for (size_t i = 0; i < m_entries.size(); ++i)
|
||||
{
|
||||
if (num == 0xFFFFFFFF) continue;
|
||||
num = m_entries[i];
|
||||
list.Write(&num, sizeof(u32));
|
||||
list.write(&num, sizeof(u32));
|
||||
}
|
||||
num = 0xFFFFFFFF;
|
||||
list.Write(&num, sizeof(u32));
|
||||
list.Close();
|
||||
list.write(&num, sizeof(u32));
|
||||
}
|
||||
|
||||
void AutoPauseManagerDialog::UpdateList(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue