Fix PTMSYSM_CheckNew3DS, closes #540
This commit is contained in:
parent
a6a6548348
commit
faf5162b60
@ -109,9 +109,10 @@ Result PTMSYSM_GetRtcTime(s64 *outMsY2k);
|
||||
Result PTMSYSM_SetRtcTime(s64 msY2k);
|
||||
|
||||
/**
|
||||
* @brief Returns 1 if it's a New 3DS, otherwise 0.
|
||||
* @brief Checks whether the system is a New 3DS.
|
||||
* @param[out] out Pointer to write the New 3DS flag to.
|
||||
*/
|
||||
Result PTMSYSM_CheckNew3DS(void);
|
||||
Result PTMSYSM_CheckNew3DS(bool *out);
|
||||
|
||||
/**
|
||||
* @brief Configures the New 3DS' CPU clock speed and L2 cache.
|
||||
|
@ -98,13 +98,14 @@ Result PTMSYSM_Awaken(void)
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result PTMSYSM_CheckNew3DS(void)
|
||||
Result PTMSYSM_CheckNew3DS(bool *out)
|
||||
{
|
||||
Result ret;
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
cmdbuf[0] = IPC_MakeHeader(0x040A,0,0); // 0x040A0000
|
||||
|
||||
if(R_FAILED(ret = svcSendSyncRequest(ptmSysmHandle)))return 0;
|
||||
if(R_FAILED(ret = svcSendSyncRequest(ptmSysmHandle)))return ret;
|
||||
*out = (bool)cmdbuf[2]; // if cmdbuf[1] is != 0 then this is uninitialized (this is fine)
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user