RSX Debugger, Mem. Viewer and module improvements

* Small cleanup in cellJpgDec and cellPngDec.
* cellPamf added to the project and a few test lines added to
cellPamfGetHeaderSize(2).
* Improved speed of the Raw Image Preview on the the Memory Viewer.
* Now you can click on the shown buffers / textures in the RSX Debugger
in order to see them in full size. More settings added to the tabs.
* Fixed cellFsStat in order to fix the crash aused by opening
directiories. The solution is really *really* ugly. Once vfsDir is
ready, I will replace it with something better.
This commit is contained in:
Alexandro Sánchez Bach 2014-01-05 00:45:44 +01:00
parent 1a43fe5ceb
commit aa9b0d0a31
10 changed files with 173 additions and 105 deletions

View file

@ -177,7 +177,7 @@ int cellFsClosedir(u32 fd)
int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
{
const wxString& path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsFstat(path: %s, sb_addr: 0x%x)", path.mb_str(), sb.GetAddr());
sys_fs.Log("cellFsStat(path: %s, sb_addr: 0x%x)", path.mb_str(), sb.GetAddr());
sb->st_mode =
CELL_FS_S_IRUSR | CELL_FS_S_IWUSR | CELL_FS_S_IXUSR |
@ -196,23 +196,35 @@ int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
{
if(path.CmpNoCase(Emu.GetVFS().m_devices[i].GetPs3Path().RemoveLast(1)) == 0)
{
sys_fs.Log("cellFsFstat: '%s' is a mount point.", path.mb_str());
sys_fs.Log("cellFsStat: '%s' is a mount point.", path.mb_str());
sb->st_mode |= CELL_FS_S_IFDIR;
return CELL_OK;
}
}
vfsFile f(path);
if(!f.IsOpened())
// TODO: Temporary solution until vfsDir is implemented
wxString real_path;
Emu.GetVFS().GetDevice(path, real_path);
struct stat s;
if(stat(real_path.c_str(), &s) == 0)
{
sys_fs.Warning("cellFsFstat: '%s' not found.", path.mb_str());
if(s.st_mode & S_IFDIR)
{
sb->st_mode |= CELL_FS_S_IFDIR;
}
else if(s.st_mode & S_IFREG)
{
vfsFile f(path);
sb->st_mode |= CELL_FS_S_IFREG;
sb->st_size = f.GetSize();
}
}
else
{
sys_fs.Warning("cellFsStat: '%s' not found.", path.mb_str());
return CELL_ENOENT;
}
sb->st_mode |= CELL_FS_S_IFREG; //TODO: dir CELL_FS_S_IFDIR
sb->st_size = f.GetSize();
return CELL_OK;
}