mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-13 07:14:49 +00:00
Small fixes
This commit is contained in:
parent
3fdb50b0ea
commit
01f3763eb4
@ -941,7 +941,7 @@ int cellSysCacheClear(void)
|
||||
Emu.GetVFS().GetDevice(wxString("/dev_hdd1/cache/"), localPath);
|
||||
if (wxDirExists(localPath)){
|
||||
WxDirDeleteTraverser deleter;
|
||||
wxString f = wxFindFirstFile(localPath+"\*",wxDIR);
|
||||
wxString f = wxFindFirstFile(localPath+"\\*",wxDIR);
|
||||
while (!f.empty())
|
||||
{
|
||||
wxDir dir(f);
|
||||
|
@ -76,19 +76,19 @@ struct sceNpTrophyInternal
|
||||
}
|
||||
};
|
||||
|
||||
sceNpTrophyInternal* s_npTrophyInstance = new sceNpTrophyInternal();
|
||||
sceNpTrophyInternal s_npTrophyInstance;
|
||||
|
||||
// Functions
|
||||
int sceNpTrophyInit(u32 pool_addr, u32 poolSize, u32 containerId, u64 options)
|
||||
{
|
||||
sceNpTrophy.Log("sceNpTrophyInit(pool_addr=0x%x, poolSize=%d, containerId=%d, options=0x%llx)", pool_addr, poolSize, containerId, options);
|
||||
|
||||
if (s_npTrophyInstance->m_bInitialized)
|
||||
if (s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_ALREADY_INITIALIZED;
|
||||
if (options)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_SUPPORTED;
|
||||
|
||||
s_npTrophyInstance->m_bInitialized = true;
|
||||
s_npTrophyInstance.m_bInitialized = true;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ int sceNpTrophyCreateContext(mem32_t context, mem_ptr_t<SceNpCommunicationId> co
|
||||
sceNpTrophy.Warning("sceNpTrophyCreateContext(context_addr=0x%x, commID_addr=0x%x, commSign_addr=0x%x, options=0x%llx)",
|
||||
context.GetAddr(), commID.GetAddr(), commSign.GetAddr(), options);
|
||||
|
||||
if (!(s_npTrophyInstance->m_bInitialized))
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
if (!context.IsGood())
|
||||
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
|
||||
@ -111,14 +111,13 @@ int sceNpTrophyCreateContext(mem32_t context, mem_ptr_t<SceNpCommunicationId> co
|
||||
Emu.GetVFS().GetDevice(ps3_path, local_path);
|
||||
|
||||
vfsLocalDir dir(local_path);
|
||||
if(!dir.Open(local_path))
|
||||
if(!dir.IsOpened())
|
||||
return SCE_NP_TROPHY_ERROR_CONF_DOES_NOT_EXIST;
|
||||
|
||||
// TODO: Following method will retrieve the TROPHY.TRP of the first folder that contains such file
|
||||
const DirEntryInfo* entry = dir.Read();
|
||||
while (entry)
|
||||
for(const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (!(entry->flags & DirEntry_TypeFile))
|
||||
if (entry->flags & DirEntry_TypeDir)
|
||||
{
|
||||
vfsStream* stream = Emu.GetVFS().Open(ps3_path + entry->name + "/TROPHY.TRP", vfsRead);
|
||||
if (stream)
|
||||
@ -126,12 +125,10 @@ int sceNpTrophyCreateContext(mem32_t context, mem_ptr_t<SceNpCommunicationId> co
|
||||
sceNpTrophyInternalContext ctxt;
|
||||
ctxt.trp_stream = stream;
|
||||
ctxt.trp_name = entry->name;
|
||||
s_npTrophyInstance->contexts.push_back(ctxt);
|
||||
s_npTrophyInstance.contexts.push_back(ctxt);
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
entry->name;
|
||||
entry = dir.Read();
|
||||
}
|
||||
|
||||
return SCE_NP_TROPHY_ERROR_CONF_DOES_NOT_EXIST;
|
||||
@ -141,7 +138,7 @@ int sceNpTrophyCreateHandle(mem32_t handle)
|
||||
{
|
||||
sceNpTrophy.Warning("sceNpTrophyCreateHandle(handle_addr=0x%x)", handle.GetAddr());
|
||||
|
||||
if (!(s_npTrophyInstance->m_bInitialized))
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
if (!handle.IsGood())
|
||||
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
|
||||
@ -157,7 +154,7 @@ int sceNpTrophyRegisterContext(u32 context, u32 handle, u32 statusCb_addr, u32 a
|
||||
sceNpTrophy.Warning("sceNpTrophyRegisterContext(context=%d, handle=%d, statusCb_addr=0x%x, arg_addr=0x%x, options=0x%llx)",
|
||||
context, handle, statusCb_addr, arg_addr, options);
|
||||
|
||||
if (!(s_npTrophyInstance->m_bInitialized))
|
||||
if (!(s_npTrophyInstance.m_bInitialized))
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
if (!Memory.IsGoodAddr(statusCb_addr))
|
||||
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
|
||||
@ -166,7 +163,7 @@ int sceNpTrophyRegisterContext(u32 context, u32 handle, u32 statusCb_addr, u32 a
|
||||
// TODO: There are other possible errors
|
||||
|
||||
int ret;
|
||||
sceNpTrophyInternalContext& ctxt = s_npTrophyInstance->contexts[context];
|
||||
sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context];
|
||||
TRPLoader trp(*(ctxt.trp_stream));
|
||||
|
||||
// TODO: Get the path of the current user
|
||||
@ -261,7 +258,7 @@ int sceNpTrophyGetGameIcon()
|
||||
|
||||
void sceNpTrophy_unload()
|
||||
{
|
||||
s_npTrophyInstance->m_bInitialized = false;
|
||||
s_npTrophyInstance.m_bInitialized = false;
|
||||
}
|
||||
|
||||
void sceNpTrophy_init()
|
||||
|
@ -307,8 +307,8 @@ extern int cellMouseGetRawData(u32 port_no, mem_class_t data);
|
||||
extern int cellGcmCallback(u32 context_addr, u32 count);
|
||||
|
||||
//sys_tty
|
||||
extern int sys_tty_read(s32 ch, u64 buf_addr, u32 len, u64 preadlen_addr);
|
||||
extern int sys_tty_write(s32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr);
|
||||
extern int sys_tty_read(u32 ch, u64 buf_addr, u32 len, u64 preadlen_addr);
|
||||
extern int sys_tty_write(u32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr);
|
||||
|
||||
//sys_heap
|
||||
extern int sys_heap_create_heap(const u32 heap_addr, const u32 start_addr, const u32 size);
|
||||
|
@ -148,8 +148,11 @@ int cellFsOpendir(u32 path_addr, mem32_t fd)
|
||||
wxString localPath;
|
||||
Emu.GetVFS().GetDevice(path, localPath);
|
||||
vfsLocalDir* dir = new vfsLocalDir(localPath);
|
||||
if(!dir->Open(localPath))
|
||||
if(!dir->IsOpened())
|
||||
{
|
||||
delete dir;
|
||||
return CELL_ENOENT;
|
||||
}
|
||||
|
||||
fd = sys_fs.GetNewId(dir);
|
||||
return CELL_OK;
|
||||
|
@ -1,17 +1,18 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
|
||||
int sys_tty_read(s32 ch, u64 buf_addr, u32 len, u64 preadlen_addr)
|
||||
int sys_tty_read(u32 ch, u64 buf_addr, u32 len, u64 preadlen_addr)
|
||||
{
|
||||
ConLog.Warning("sys_tty_read: ch: %d, buf addr: %llx, len: %d", ch, buf_addr, len);
|
||||
Memory.Write32NN(preadlen_addr, len);
|
||||
Emu.Pause();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_tty_write(s32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr)
|
||||
int sys_tty_write(u32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr)
|
||||
{
|
||||
if(ch < 0 || ch > 15 || (s32)len <= 0) return CELL_EINVAL;
|
||||
if(ch > 15 || (s32)len <= 0) return CELL_EINVAL;
|
||||
if(!Memory.IsGoodAddr(buf_addr)) return CELL_EFAULT;
|
||||
|
||||
Emu.GetDbgCon().Write(ch, Memory.ReadString(buf_addr, len));
|
||||
|
@ -12,7 +12,7 @@ enum CompilerIDs
|
||||
|
||||
wxFont GetFont(int size)
|
||||
{
|
||||
return wxFont(size, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
return wxFont(size, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
}
|
||||
|
||||
CompilerELF::CompilerELF(wxWindow* parent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user