Example #1
0
//OK
int sceUsbAccGetInfo(u64 *lpDst) // at 0x00000068 
{
	int ret = 0;
	int curIntCtrlState = sceKernelCpuSuspendIntr();
	if (!g_bAttached)
	{
		sceKernelCpuResumeIntr(curIntCtrlState);
		return (0x80243007);
	}
	if (sceUsbBus_driver_8A3EB5D2() == 0)
	{
		sceKernelCpuResumeIntr(curIntCtrlState);
		return (0x80243701);
	}

	if (lpDst)
	{
		if (((((u32)lpDst + 8) | (u32)lpDst) & (pspSdkGetK1() << 11)) >= 0)
		{
			*lpDst = g_info;
		}
	}
	else
	{
		ret = 0x80243002;
	}

	sceKernelCpuResumeIntr(curIntCtrlState);
	return (ret);
}
Example #2
0
int sceUtilityGetSystemParamInt_patched( int id, int *value )
{
	int ret;
	
	k1 = pspSdkGetK1();
	
	ret = sceUtilityGetSystemParamInt(id, value);
	if (ret != 0) goto noPatch_exit;
	
	if (id == 8)
	{
		*value = languagePatch;
	}

noPatch_exit:
	pspSdkSetK1(k1);
	
	return ret;
}