I tried adding in reading of ini from gameid
Code: Select all
#define GAMEID_DIR "disc0:/UMD_DATA.BIN"
int get_gameid(char *gameid) {
SceUID fd = sceIoOpen(GAMEID_DIR, PSP_O_RDONLY, 0777);
if (fd >= 0) {
sceIoRead(fd, gameid, 10);
sceIoClose(fd);
// remove the "-" from the gameid
if (gameid[4] == '-') {
memmove(gameid + 4, gameid + 5, 5);
}
gameid[9] = '\0';
}
return fd;
}
int module_start(SceSize args, void *argp)
{
char name[512];
char gameid[16];
get_gameid(gameid);
sprintf(name, "ms0:/seplugins/DS3Remapper/%s.ini", gameid);
//init config
initConfig(g_key, &g_conf);
ILPReadFromFile(g_key, name);
/* Find ctrl.prx */
SceModule2 *mod = sceKernelFindModuleByName("sceController_Service");
/* Find function and hook it */
int i;
for(i = 0; i < mod->text_size; i += 4)
{
u32 addr = mod->text_addr + i;
if(_lw(addr) == 0x35030104)
{
HIJACK_FUNCTION(addr - 0x1C, sceCtrlReadBufPatched, sceCtrlReadBuf);
break;
}
}
/* Clear caches */
sceKernelDcacheWritebackAll();
sceKernelIcacheClearAll();
return 0;
}
it should be reading the ini fromms0:/seplugins/DS3Remapper/NPJH50343.ini but it doesn't
anyone see what is going wrong?
Advertising