fix stop when trying to run two games in a row

This commit is contained in:
elisha464 2014-01-23 19:03:43 +02:00
parent ec942f2657
commit 64bfae6648

View File

@ -4,7 +4,9 @@
#include "Emu/GS/GCM.h"
void cellGcmSys_init();
Module cellGcmSys(0x0010, cellGcmSys_init);
void cellGcmSys_Load();
void cellGcmSys_Unload();
Module cellGcmSys(0x0010, cellGcmSys_init, cellGcmSys_Load, cellGcmSys_Unload);
u32 local_size = 0;
u32 local_addr = NULL;
@ -54,6 +56,9 @@ int cellGcmInit(u32 context_addr, u32 cmdSize, u32 ioSize, u32 ioAddress)
{
cellGcmSys.Warning("cellGcmInit(context_addr=0x%x,cmdSize=0x%x,ioSize=0x%x,ioAddress=0x%x)", context_addr, cmdSize, ioSize, ioAddress);
if(!cellGcmSys.IsLoaded())
cellGcmSys.Load();
if(!local_size && !local_addr)
{
local_size = 0xf900000; //TODO
@ -799,9 +804,6 @@ int32_t cellGcmUnreserveIoMapSize(u32 size)
void cellGcmSys_init()
{
current_config.ioAddress = NULL;
current_config.localAddress = NULL;
cellGcmSys.AddFunc(0x055bd74d, cellGcmGetTiledPitchSize);
cellGcmSys.AddFunc(0x06edea9e, cellGcmSetUserHandler);
cellGcmSys.AddFunc(0x15bae46b, cellGcmInit);
@ -861,3 +863,15 @@ void cellGcmSys_init()
cellGcmSys.AddFunc(0xdb23e867, cellGcmUnmapIoAddress);
cellGcmSys.AddFunc(0x3b9bd5bd, cellGcmUnreserveIoMapSize);
}
void cellGcmSys_Load()
{
current_config.ioAddress = NULL;
current_config.localAddress = NULL;
local_size = 0;
local_addr = NULL;
}
void cellGcmSys_Unload()
{
}