mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Merge pull request #153 from Bigpet/wxString_exorcism
wxString exorcism
This commit is contained in:
commit
bc095322c3
126 changed files with 1723 additions and 1509 deletions
|
|
@ -63,7 +63,7 @@ void addSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, const std::st
|
|||
return;
|
||||
|
||||
// PNG icon
|
||||
wxString localPath;
|
||||
std::string localPath;
|
||||
int width, height, actual_components;
|
||||
Emu.GetVFS().GetDevice(saveDir + "/ICON0.PNG", localPath);
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ void addSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, const std::st
|
|||
saveEntry.st_atime_ = 0; // TODO
|
||||
saveEntry.st_mtime_ = 0; // TODO
|
||||
saveEntry.st_ctime_ = 0; // TODO
|
||||
saveEntry.iconBuf = stbi_load(localPath.mb_str(), &width, &height, &actual_components, 3);
|
||||
saveEntry.iconBuf = stbi_load(localPath.c_str(), &width, &height, &actual_components, 3);
|
||||
saveEntry.iconBufSize = width * height * 3;
|
||||
saveEntry.isNew = false;
|
||||
|
||||
|
|
@ -229,11 +229,11 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
if(!dir.IsOpened())
|
||||
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||
|
||||
std::string dirNamePrefix = std::string(Memory.ReadString(setList->dirNamePrefix_addr).mb_str());
|
||||
std::string dirNamePrefix = Memory.ReadString(setList->dirNamePrefix_addr);
|
||||
std::vector<SaveDataListEntry> saveEntries;
|
||||
for(const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (entry->flags & DirEntry_TypeDir || entry->name.Left(dirNamePrefix.size()) == dirNamePrefix)
|
||||
if (entry->flags & DirEntry_TypeDir || entry->name.substr(0,dirNamePrefix.size()) == dirNamePrefix)
|
||||
{
|
||||
// Count the amount of matches and the amount of listed directories
|
||||
listGet->dirListNum++;
|
||||
|
|
@ -241,7 +241,7 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
continue;
|
||||
listGet->dirNum++;
|
||||
|
||||
std::string saveDir = saveBaseDir + (const char*)(entry->name.mb_str());
|
||||
std::string saveDir = saveBaseDir + entry->name;
|
||||
addSaveDataEntry(saveEntries, saveDir);
|
||||
}
|
||||
}
|
||||
|
|
@ -322,11 +322,11 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
if(!dir.IsOpened())
|
||||
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||
|
||||
std::string dirNamePrefix = std::string(Memory.ReadString(setList->dirNamePrefix_addr).mb_str());
|
||||
std::string dirNamePrefix = Memory.ReadString(setList->dirNamePrefix_addr);
|
||||
std::vector<SaveDataListEntry> saveEntries;
|
||||
for(const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (entry->flags & DirEntry_TypeDir || entry->name.Left(dirNamePrefix.size()) == dirNamePrefix)
|
||||
if (entry->flags & DirEntry_TypeDir || entry->name.substr(0,dirNamePrefix.size()) == dirNamePrefix)
|
||||
{
|
||||
// Count the amount of matches and the amount of listed directories
|
||||
listGet->dirListNum++;
|
||||
|
|
@ -334,7 +334,7 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
continue;
|
||||
listGet->dirNum++;
|
||||
|
||||
std::string saveDir = saveBaseDir + (const char*)(entry->name.mb_str());
|
||||
std::string saveDir = saveBaseDir + entry->name;
|
||||
addSaveDataEntry(saveEntries, saveDir);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue