Fix be_ts and fix loading in some modules

This commit is contained in:
Raul Tambre 2015-02-23 17:09:52 +02:00
parent ef3a011919
commit e6a47bfa89
14 changed files with 47 additions and 73 deletions

View file

@ -562,13 +562,10 @@ int cellCameraRemoveNotifyEventQueue2()
return CELL_OK;
}
void cellCamera_unload()
{
cellCameraInstance.m_bInitialized = false;
}
Module cellCamera("cellCamera", []()
{
cellCameraInstance.m_bInitialized = false;
REG_FUNC(cellCamera, cellCameraInit);
REG_FUNC(cellCamera, cellCameraEnd);
REG_FUNC(cellCamera, cellCameraOpen);

View file

@ -382,14 +382,11 @@ int cellGemWriteExternalPort()
return CELL_OK;
}
void cellGem_unload()
{
cellGemInstance.m_bInitialized = false;
}
Module cellGem("cellGem", []()
{
//cellGem.AddFunc(, cellGemAttributeInit);
cellGemInstance.m_bInitialized = false;
//REG_FUNC(cellGem, cellGemAttributeInit);
REG_FUNC(cellGem, cellGemCalibrate);
REG_FUNC(cellGem, cellGemClearStatusFlags);
REG_FUNC(cellGem, cellGemConvertVideoFinish);
@ -413,21 +410,21 @@ Module cellGem("cellGem", []()
REG_FUNC(cellGem, cellGemGetState);
REG_FUNC(cellGem, cellGemGetStatusFlags);
REG_FUNC(cellGem, cellGemGetTrackerHue);
//cellGem.AddFunc(, cellGemGetVideoConvertSize);
//REG_FUNC(cellGem, cellGemGetVideoConvertSize);
REG_FUNC(cellGem, cellGemHSVtoRGB);
REG_FUNC(cellGem, cellGemInit);
REG_FUNC(cellGem, cellGemInvalidateCalibration);
REG_FUNC(cellGem, cellGemIsTrackableHue);
REG_FUNC(cellGem, cellGemPrepareCamera);
REG_FUNC(cellGem, cellGemPrepareVideoConvert);
//cellGem.AddFunc(, cellGemReadExternalPortDeviceInfo);
//REG_FUNC(cellGem, cellGemReadExternalPortDeviceInfo);
REG_FUNC(cellGem, cellGemReset);
REG_FUNC(cellGem, cellGemSetRumble);
REG_FUNC(cellGem, cellGemSetYaw);
REG_FUNC(cellGem, cellGemTrackHues);
REG_FUNC(cellGem, cellGemUpdateFinish);
REG_FUNC(cellGem, cellGemUpdateStart);
//cellGem.AddFunc(, cellGemVideoConvertAttributeInit);
//cellGem.AddFunc(, cellGemVideoConvertAttributeInitRgba);
//REG_FUNC(cellGem, cellGemVideoConvertAttributeInit);
//REG_FUNC(cellGem, cellGemVideoConvertAttributeInitRgba);
REG_FUNC(cellGem, cellGemWriteExternalPort);
});

View file

@ -17,16 +17,16 @@ struct cellMicInternal
}
};
cellMicInternal CellMicInstance;
cellMicInternal cellMicInstance;
int cellMicInit()
{
cellMic.Warning("cellMicInit()");
if (CellMicInstance.m_bCellMicInitialized)
if (cellMicInstance.m_bCellMicInitialized)
return CELL_MICIN_ERROR_ALREADY_INIT;
CellMicInstance.m_bCellMicInitialized = true;
cellMicInstance.m_bCellMicInitialized = true;
return CELL_OK;
}
@ -35,10 +35,10 @@ int cellMicEnd()
{
cellMic.Warning("cellMicEnd()");
if (!CellMicInstance.m_bCellMicInitialized)
if (!cellMicInstance.m_bCellMicInitialized)
return CELL_MICIN_ERROR_NOT_INIT;
CellMicInstance.m_bCellMicInitialized = false;
cellMicInstance.m_bCellMicInitialized = false;
return CELL_OK;
}
@ -283,13 +283,10 @@ int cellMicGetDeviceIdentifier()
return CELL_OK;
}
void cellMic_unload()
{
CellMicInstance.m_bCellMicInitialized = false;
}
Module cellMic("cellMic", []()
{
cellMicInstance.m_bCellMicInitialized = false;
REG_FUNC(cellMic, cellMicInit);
REG_FUNC(cellMic, cellMicEnd);
REG_FUNC(cellMic, cellMicOpen);

View file

@ -118,13 +118,10 @@ int cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
return CELL_OK;
}
void cellNetCtl_unload()
{
cellNetCtlInstance.m_bInitialized = false;
}
Module cellNetCtl("cellNetCtl", []()
{
cellNetCtlInstance.m_bInitialized = false;
REG_FUNC(cellNetCtl, cellNetCtlInit);
REG_FUNC(cellNetCtl, cellNetCtlTerm);

View file

@ -200,6 +200,8 @@ s32 cellRudpProcessEvents()
Module cellRudp("cellRudp", []()
{
cellRudpInstance.m_bInitialized = false;
REG_FUNC(cellRudp, cellRudpInit);
REG_FUNC(cellRudp, cellRudpEnd);
REG_FUNC(cellRudp, cellRudpEnableInternalIOThread);

View file

@ -158,6 +158,8 @@ s32 cellSearchEnd()
Module cellSearch("cellSearch", []()
{
cellSearchInstance.m_bInitialized = false;
REG_FUNC(cellSearch, cellSearchInitialize);
REG_FUNC(cellSearch, cellSearchFinalize);
REG_FUNC(cellSearch, cellSearchStartListSearch);

View file

@ -173,13 +173,13 @@ struct CellSearchContentId
struct CellSearchResultParam
{
CellSearchId searchId;
be_t<CellSearchId> searchId;
be_t<u32> resultNum;
};
struct CellSearchMusicListInfo
{
CellSearchListType listType;
be_t<CellSearchListType> listType;
be_t<u32> numOfItems;
be_t<s64> duration;
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
@ -190,7 +190,7 @@ struct CellSearchMusicListInfo
struct CellSearchPhotoListInfo
{
CellSearchListType listType;
be_t<CellSearchListType> listType;
be_t<u32> numOfItems;
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
char reserved[3];
@ -198,7 +198,7 @@ struct CellSearchPhotoListInfo
struct CellSearchVideoListInfo
{
CellSearchListType listType;
be_t<CellSearchListType> listType;
be_t<u32> numOfItems;
be_t<s64> duration;
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
@ -218,8 +218,8 @@ struct CellSearchMusicInfo
be_t<s32> quantizationBitrate;
be_t<s32> playCount;
be_t<s32> drmEncrypted;
CellSearchCodec codec;
CellSearchContentStatus status;
be_t<CellSearchCodec> codec;
be_t<CellSearchContentStatus> status;
char diskNumber[8];
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
char reserved[3];
@ -238,9 +238,9 @@ struct CellSearchPhotoInfo
be_t<s64> takenDate;
be_t<s32> width;
be_t<s32> height;
CellSearchOrientation orientation;
CellSearchCodec codec;
CellSearchContentStatus status;
be_t<CellSearchOrientation> orientation;
be_t<CellSearchCodec> codec;
be_t<CellSearchContentStatus> status;
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
char reserved[3];
char albumTitle[CELL_SEARCH_TITLE_LEN_MAX + 1];
@ -257,9 +257,9 @@ struct CellSearchVideoInfo
be_t<s32> audioBitrate;
be_t<s32> playCount;
be_t<s32> drmEncrypted;
CellSearchCodec videoCodec;
CellSearchCodec audioCodec;
CellSearchContentStatus status;
be_t<CellSearchCodec> videoCodec;
be_t<CellSearchCodec> audioCodec;
be_t<CellSearchContentStatus> status;
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
char reserved[3];
char albumTitle[CELL_SEARCH_TITLE_LEN_MAX + 1];
@ -268,10 +268,10 @@ struct CellSearchVideoInfo
struct CellSearchVideoSceneInfo
{
CellSearchSceneType sceneType;
be_t<CellSearchSceneType> sceneType;
be_t<s64> startTime_ms;
be_t<s64> endTime_ms;
CellSearchContentId videoId;
be_t<CellSearchContentId> videoId;
char title[CELL_SEARCH_TITLE_LEN_MAX + 1];
char reserved[3];
char tags[CELL_SEARCH_TAG_NUM_MAX][CELL_SEARCH_TAG_LEN_MAX];

View file

@ -176,6 +176,8 @@ s32 cellUsbdFreeMemory()
Module cellUsbd("cellUsbd", []()
{
cellUsbdInstance.m_bInitialized = false;
REG_FUNC(cellUsbd, cellUsbdInit);
REG_FUNC(cellUsbd, cellUsbdEnd);

View file

@ -1634,17 +1634,14 @@ int _sceNpSysutilClientFree()
return CELL_OK;
}
void sceNp_unload()
Module sceNp("sceNp", []()
{
sceNpInstance.m_bSceNpInitialized = false;
sceNpInstance.m_bSceNp2Initialized = false;
sceNpInstance.m_bScoreInitialized = false;
sceNpInstance.m_bLookupInitialized = false;
sceNpInstance.m_bSceNpUtilBandwidthTestInitialized = false;
}
Module sceNp("sceNp", []()
{
REG_FUNC(sceNp, sceNpInit);
REG_FUNC(sceNp, sceNp2Init);
REG_FUNC(sceNp, sceNpUtilBandwidthTestInitStart);

View file

@ -427,13 +427,10 @@ int sceNpClansRemoveChallenge()
return CELL_OK;
}
void sceNpClans_unload()
{
sceNpClansInstance.m_bSceNpClansInitialized = false;
}
Module sceNpClans("sceNpClans", []()
{
sceNpClansInstance.m_bSceNpClansInitialized = false;
REG_FUNC(sceNpClans, sceNpClansInit);
REG_FUNC(sceNpClans, sceNpClansTerm);
REG_FUNC(sceNpClans, sceNpClansCreateRequest);

View file

@ -312,13 +312,10 @@ int sceNpCommerce2DestroyReq()
return CELL_OK;
}
void sceNpCommerce2_unload()
{
sceNpCommerce2Instance.m_bSceNpCommerce2Initialized = false;
}
Module sceNpCommerce2("sceNpCommerce2", []()
{
sceNpCommerce2Instance.m_bSceNpCommerce2Initialized = false;
REG_FUNC(sceNpCommerce2, sceNpCommerce2ExecuteStoreBrowse);
REG_FUNC(sceNpCommerce2, sceNpCommerce2GetStoreBrowseUserdata);
REG_FUNC(sceNpCommerce2, sceNpCommerce2Init);

View file

@ -4,11 +4,6 @@
extern Module sceNpSns;
void sceNpSns_unload()
{
// TODO: Unload SNS module
}
Module sceNpSns("sceNpSns", []()
{
// TODO: Register SNS module functions here

View file

@ -448,13 +448,10 @@ int sceNpTrophyGetGameIcon()
return CELL_OK;
}
void sceNpTrophy_unload()
{
sceNpTrophyInstance.m_bInitialized = false;
}
Module sceNpTrophy("sceNpTrophy", []()
{
sceNpTrophyInstance.m_bInitialized = false;
REG_FUNC(sceNpTrophy, sceNpTrophyGetGameProgress);
REG_FUNC(sceNpTrophy, sceNpTrophyRegisterContext);
REG_FUNC(sceNpTrophy, sceNpTrophyCreateHandle);

View file

@ -563,13 +563,10 @@ int sceNpTusDeleteMultiSlotDataVUserAsync()
return CELL_OK;
}
void sceNpTus_unload()
{
sceNpTusInstance.m_bSceNpTusInitialized = false;
}
Module sceNpTus("sceNpTus", []()
{
sceNpTusInstance.m_bSceNpTusInitialized = false;
REG_FUNC(sceNpTus, sceNpTusInit);
REG_FUNC(sceNpTus, sceNpTusTerm);
REG_FUNC(sceNpTus, sceNpTusCreateTitleCtx);