mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
Fix some int/ptr comparisons.
This commit is contained in:
parent
b550ccfc73
commit
2fdefc4fb5
8 changed files with 18 additions and 18 deletions
|
@ -421,7 +421,7 @@ bool SELFDecrypter::MakeElf(const std::string& elf, bool isElf32)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write section headers.
|
// Write section headers.
|
||||||
if(self_hdr.se_shdroff != NULL)
|
if(self_hdr.se_shdroff != 0)
|
||||||
{
|
{
|
||||||
e.Seek(elf32_hdr.e_shoff);
|
e.Seek(elf32_hdr.e_shoff);
|
||||||
|
|
||||||
|
@ -482,7 +482,7 @@ bool SELFDecrypter::MakeElf(const std::string& elf, bool isElf32)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write section headers.
|
// Write section headers.
|
||||||
if(self_hdr.se_shdroff != NULL)
|
if(self_hdr.se_shdroff != 0)
|
||||||
{
|
{
|
||||||
e.Seek(elf64_hdr.e_shoff);
|
e.Seek(elf64_hdr.e_shoff);
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ struct CCellFontInternal //Module cellFont
|
||||||
bool m_bFontGcmInitialized;
|
bool m_bFontGcmInitialized;
|
||||||
|
|
||||||
CCellFontInternal()
|
CCellFontInternal()
|
||||||
: m_buffer_addr(NULL)
|
: m_buffer_addr(0)
|
||||||
, m_buffer_size(0)
|
, m_buffer_size(0)
|
||||||
, m_bInitialized(false)
|
, m_bInitialized(false)
|
||||||
, m_bFontGcmInitialized(false)
|
, m_bFontGcmInitialized(false)
|
||||||
|
@ -301,7 +301,7 @@ int cellFontOpenFontMemory(mem_ptr_t<CellFontLibrary> library, u32 fontAddr, u32
|
||||||
if (!stbtt_InitFont(&(font->stbfont), (unsigned char*)Memory.VirtualToRealAddr(fontAddr), 0))
|
if (!stbtt_InitFont(&(font->stbfont), (unsigned char*)Memory.VirtualToRealAddr(fontAddr), 0))
|
||||||
return CELL_FONT_ERROR_FONT_OPEN_FAILED;
|
return CELL_FONT_ERROR_FONT_OPEN_FAILED;
|
||||||
|
|
||||||
font->renderer_addr = NULL;
|
font->renderer_addr = 0;
|
||||||
font->fontdata_addr = fontAddr;
|
font->fontdata_addr = fontAddr;
|
||||||
font->origin = CELL_FONT_OPEN_MEMORY;
|
font->origin = CELL_FONT_OPEN_MEMORY;
|
||||||
return CELL_FONT_OK;
|
return CELL_FONT_OK;
|
||||||
|
@ -531,7 +531,7 @@ int cellFontUnbindRenderer(mem_ptr_t<CellFont> font)
|
||||||
if (!font->renderer_addr)
|
if (!font->renderer_addr)
|
||||||
return CELL_FONT_ERROR_RENDERER_UNBIND;
|
return CELL_FONT_ERROR_RENDERER_UNBIND;
|
||||||
|
|
||||||
font->renderer_addr = NULL;
|
font->renderer_addr = 0;
|
||||||
return CELL_FONT_OK;
|
return CELL_FONT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ void cellGcmSys_unload();
|
||||||
Module cellGcmSys(0x0010, cellGcmSys_init, cellGcmSys_load, cellGcmSys_unload);
|
Module cellGcmSys(0x0010, cellGcmSys_init, cellGcmSys_load, cellGcmSys_unload);
|
||||||
|
|
||||||
u32 local_size = 0;
|
u32 local_size = 0;
|
||||||
u32 local_addr = NULL;
|
u32 local_addr = 0;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -956,10 +956,10 @@ void cellGcmSys_init()
|
||||||
|
|
||||||
void cellGcmSys_load()
|
void cellGcmSys_load()
|
||||||
{
|
{
|
||||||
current_config.ioAddress = NULL;
|
current_config.ioAddress = 0;
|
||||||
current_config.localAddress = NULL;
|
current_config.localAddress = 0;
|
||||||
local_size = 0;
|
local_size = 0;
|
||||||
local_addr = NULL;
|
local_addr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cellGcmSys_unload()
|
void cellGcmSys_unload()
|
||||||
|
|
|
@ -57,7 +57,7 @@ int cellGifDecOpen(u32 mainHandle, mem32_t subHandle, const mem_ptr_t<CellGifDec
|
||||||
|
|
||||||
// Get file descriptor
|
// Get file descriptor
|
||||||
MemoryAllocator<be_t<u32>> fd;
|
MemoryAllocator<be_t<u32>> fd;
|
||||||
int ret = cellFsOpen(src->fileName, 0, fd, NULL, 0);
|
int ret = cellFsOpen(src->fileName, 0, fd, 0, 0);
|
||||||
current_subHandle->fd = fd->ToLE();
|
current_subHandle->fd = fd->ToLE();
|
||||||
if(ret != CELL_OK) return CELL_GIFDEC_ERROR_OPEN_FILE;
|
if(ret != CELL_OK) return CELL_GIFDEC_ERROR_OPEN_FILE;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellJpgDecSrc> s
|
||||||
|
|
||||||
// Get file descriptor
|
// Get file descriptor
|
||||||
MemoryAllocator<be_t<u32>> fd;
|
MemoryAllocator<be_t<u32>> fd;
|
||||||
int ret = cellFsOpen(src->fileName, 0, fd, NULL, 0);
|
int ret = cellFsOpen(src->fileName, 0, fd, 0, 0);
|
||||||
current_subHandle->fd = fd->ToLE();
|
current_subHandle->fd = fd->ToLE();
|
||||||
if(ret != CELL_OK) return CELL_JPGDEC_ERROR_OPEN_FILE;
|
if(ret != CELL_OK) return CELL_JPGDEC_ERROR_OPEN_FILE;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> s
|
||||||
|
|
||||||
CellPngDecSubHandle *current_subHandle = new CellPngDecSubHandle;
|
CellPngDecSubHandle *current_subHandle = new CellPngDecSubHandle;
|
||||||
|
|
||||||
current_subHandle->fd = NULL;
|
current_subHandle->fd = 0;
|
||||||
current_subHandle->src = *src;
|
current_subHandle->src = *src;
|
||||||
|
|
||||||
switch(src->srcSelect.ToBE())
|
switch(src->srcSelect.ToBE())
|
||||||
|
@ -41,7 +41,7 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> s
|
||||||
case const_se_t<u32, CELL_PNGDEC_FILE>::value:
|
case const_se_t<u32, CELL_PNGDEC_FILE>::value:
|
||||||
// Get file descriptor
|
// Get file descriptor
|
||||||
MemoryAllocator<be_t<u32>> fd;
|
MemoryAllocator<be_t<u32>> fd;
|
||||||
int ret = cellFsOpen(src->fileName_addr, 0, fd.GetAddr(), NULL, 0);
|
int ret = cellFsOpen(src->fileName_addr, 0, fd.GetAddr(), 0, 0);
|
||||||
current_subHandle->fd = fd->ToLE();
|
current_subHandle->fd = fd->ToLE();
|
||||||
if(ret != CELL_OK) return CELL_PNGDEC_ERROR_OPEN_FILE;
|
if(ret != CELL_OK) return CELL_PNGDEC_ERROR_OPEN_FILE;
|
||||||
|
|
||||||
|
|
|
@ -517,7 +517,7 @@ int cellRescSetDisplayMode(u32 displayMode)
|
||||||
videocfg->aspect = CELL_VIDEO_OUT_ASPECT_AUTO;
|
videocfg->aspect = CELL_VIDEO_OUT_ASPECT_AUTO;
|
||||||
videocfg->pitch = s_rescInternalInstance->m_dstPitch;
|
videocfg->pitch = s_rescInternalInstance->m_dstPitch;
|
||||||
|
|
||||||
cellVideoOutConfigure(CELL_VIDEO_OUT_PRIMARY, videocfg.GetAddr(), NULL, 0);
|
cellVideoOutConfigure(CELL_VIDEO_OUT_PRIMARY, videocfg.GetAddr(), 0, 0);
|
||||||
|
|
||||||
if (IsPalInterpolate())
|
if (IsPalInterpolate())
|
||||||
{
|
{
|
||||||
|
@ -527,7 +527,7 @@ int cellRescSetDisplayMode(u32 displayMode)
|
||||||
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
||||||
//cellGcmSetVBlankHandler(CCellRescInternal::IntrHandler50);
|
//cellGcmSetVBlankHandler(CCellRescInternal::IntrHandler50);
|
||||||
//cellGcmSetSecondVHandler(CCellRescInternal::IntrHandler60);
|
//cellGcmSetSecondVHandler(CCellRescInternal::IntrHandler60);
|
||||||
cellGcmSetFlipHandler(NULL);
|
cellGcmSetFlipHandler(0);
|
||||||
}
|
}
|
||||||
else if (IsPalDrop())
|
else if (IsPalDrop())
|
||||||
{
|
{
|
||||||
|
@ -535,7 +535,7 @@ int cellRescSetDisplayMode(u32 displayMode)
|
||||||
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
cellGcmSetSecondVFrequency(CELL_GCM_DISPLAY_FREQUENCY_59_94HZ);
|
||||||
//cellGcmSetVBlankHandler(NULL);
|
//cellGcmSetVBlankHandler(NULL);
|
||||||
//cellGcmSetSecondVHandler(CCellRescInternal::IntrHandler60Drop);
|
//cellGcmSetSecondVHandler(CCellRescInternal::IntrHandler60Drop);
|
||||||
cellGcmSetFlipHandler(NULL);
|
cellGcmSetFlipHandler(0);
|
||||||
}
|
}
|
||||||
else if (IsPal60Hsync())
|
else if (IsPal60Hsync())
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@ extern "C"
|
||||||
void sys_net_init();
|
void sys_net_init();
|
||||||
Module sys_net((u16)0x0000, sys_net_init);
|
Module sys_net((u16)0x0000, sys_net_init);
|
||||||
|
|
||||||
mem32_t g_lastError(NULL);
|
mem32_t g_lastError(0);
|
||||||
|
|
||||||
|
|
||||||
// Auxiliary Functions
|
// Auxiliary Functions
|
||||||
|
@ -476,7 +476,7 @@ int sys_net_finalize_network()
|
||||||
{
|
{
|
||||||
sys_net.Warning("sys_net_initialize_network_ex()");
|
sys_net.Warning("sys_net_initialize_network_ex()");
|
||||||
Memory.Free(g_lastError.GetAddr());
|
Memory.Free(g_lastError.GetAddr());
|
||||||
g_lastError.SetAddr(NULL);
|
g_lastError.SetAddr(0);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue