Experimental class template Module<T>

Allocates ps3 memory for specific instance T
This commit is contained in:
Nekotekina 2015-09-08 16:53:28 +03:00
parent 093ecc0a02
commit 12f36cf31f
123 changed files with 494 additions and 379 deletions

View file

@ -4,7 +4,7 @@
#include "Emu/SysCalls/ModuleManager.h"
#include "Emu/SysCalls/Modules.h"
extern Module cellSysmodule;
extern Module<> cellSysmodule;
enum
{
@ -156,7 +156,7 @@ s32 cellSysmoduleLoadModule(u16 id)
return CELL_SYSMODULE_ERROR_UNKNOWN;
}
if (Module* m = Emu.GetModuleManager().GetModuleById(id))
if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
{
// CELL_SYSMODULE_ERROR_DUPLICATED shouldn't be returned
m->Load();
@ -174,7 +174,7 @@ s32 cellSysmoduleUnloadModule(u16 id)
return CELL_SYSMODULE_ERROR_UNKNOWN;
}
if (Module* m = Emu.GetModuleManager().GetModuleById(id))
if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
{
if (!m->IsLoaded())
{
@ -197,7 +197,7 @@ s32 cellSysmoduleIsLoaded(u16 id)
return CELL_SYSMODULE_ERROR_UNKNOWN;
}
if (Module* m = Emu.GetModuleManager().GetModuleById(id))
if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
{
if (!m->IsLoaded())
{
@ -209,7 +209,7 @@ s32 cellSysmoduleIsLoaded(u16 id)
return CELL_SYSMODULE_LOADED;
}
Module cellSysmodule("cellSysmodule", []()
Module<> cellSysmodule("cellSysmodule", []()
{
REG_FUNC(cellSysmodule, cellSysmoduleInitialize);
REG_FUNC(cellSysmodule, cellSysmoduleFinalize);