File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,10 @@ Result PTMSYSM_GetRtcTime(s64 *outMsY2k);
109109Result PTMSYSM_SetRtcTime (s64 msY2k );
110110
111111/**
112- * @brief Returns 1 if it's a New 3DS, otherwise 0.
112+ * @brief Checks whether the system is a New 3DS.
113+ * @param[out] out Pointer to write the New 3DS flag to.
113114 */
114- Result PTMSYSM_CheckNew3DS (void );
115+ Result PTMSYSM_CheckNew3DS (bool * out );
115116
116117/**
117118 * @brief Configures the New 3DS' CPU clock speed and L2 cache.
Original file line number Diff line number Diff line change @@ -98,13 +98,14 @@ Result PTMSYSM_Awaken(void)
9898 return (Result )cmdbuf [1 ];
9999}
100100
101- Result PTMSYSM_CheckNew3DS (void )
101+ Result PTMSYSM_CheckNew3DS (bool * out )
102102{
103103 Result ret ;
104104 u32 * cmdbuf = getThreadCommandBuffer ();
105105 cmdbuf [0 ] = IPC_MakeHeader (0x040A ,0 ,0 ); // 0x040A0000
106106
107- if (R_FAILED (ret = svcSendSyncRequest (ptmSysmHandle )))return 0 ;
107+ if (R_FAILED (ret = svcSendSyncRequest (ptmSysmHandle )))return ret ;
108+ * out = (bool )cmdbuf [2 ]; // if cmdbuf[1] is != 0 then this is uninitialized (this is fine)
108109
109110 return (Result )cmdbuf [1 ];
110111}
You can’t perform that action at this time.
0 commit comments