Change ModuleManager::init function.

First step to help refactor Module management.
Add every module in the static ModuleInfo list. Module without id are assigned
to 0xffff.
The init function is called after constructor and take a pointer to Module
as an input.
This pointer is used to set the Module's global pointer in its file.
This commit is contained in:
Arkaran99 2014-09-13 22:00:17 +02:00
parent 7dafb164e8
commit 3caff5a107
46 changed files with 321 additions and 461 deletions

View file

@ -17,8 +17,6 @@ extern "C"
#include "cellPamf.h"
#include "cellAdec.h"
//void cellAdec_init();
//Module cellAdec(0x0006, cellAdec_init);
Module *cellAdec = nullptr;
AudioDecoder::AudioDecoder(AudioCodecType type, u32 addr, u32 size, vm::ptr<CellAdecCbMsg> func, u32 arg)
@ -808,8 +806,10 @@ int cellAdecGetPcmItem(u32 handle, vm::ptr<be_t<u32>> pcmItem_ptr)
return CELL_OK;
}
void cellAdec_init()
void cellAdec_init(Module * pxThis)
{
cellAdec = pxThis;
REG_FUNC(cellAdec, cellAdecQueryAttr);
REG_FUNC(cellAdec, cellAdecOpen);
REG_FUNC(cellAdec, cellAdecOpenEx);