@@ -137,7 +137,7 @@ std::map<int, std::string>IrxLoader::IOPErrors = {
137
137
*/
138
138
std::string IrxLoader::GetIrxErrorDescription (const int ID, const int RET = 0 ) {
139
139
if (RET == 1 ) return " Module willingly requested to be unloaded from IOP" ;
140
- return IOPErrors[ID]
140
+ return IrxLoader:: IOPErrors[ID]
141
141
}
142
142
143
143
void IrxLoader::loadAll (const bool & withUsb, const bool & isLoggingToFile) {
@@ -186,26 +186,26 @@ int IrxLoader::applyRpcPatches() {
186
186
void IrxLoader::loadLibsd (const bool & verbose) {
187
187
if (verbose) TYRA_LOG (" IRX: Loading libsd..." );
188
188
189
- int ret;
190
- SifExecModuleBuffer (&libsd_irx, size_libsd_irx, 0 , nullptr , &ret);
191
- TYRA_ASSERT (ret >= 0 , " Failed to load module: libsd_irx" );
189
+ int ret, id ;
190
+ id = SifExecModuleBuffer (&libsd_irx, size_libsd_irx, 0 , nullptr , &ret);
191
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: libsd_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
192
192
193
193
if (verbose) TYRA_LOG (" IRX: Libsd loaded!" );
194
194
}
195
195
196
196
void IrxLoader::loadIO (const bool & verbose) {
197
- int ret;
197
+ int ret, id ;
198
198
if (verbose) TYRA_LOG (" IRX: Loading iomanX..." );
199
199
200
- SifExecModuleBuffer (&iomanX_irx, size_iomanX_irx, 0 , nullptr , &ret);
201
- TYRA_ASSERT (ret >= 0 , " Failed to load module: iomanX_irx" );
200
+ id = SifExecModuleBuffer (&iomanX_irx, size_iomanX_irx, 0 , nullptr , &ret);
201
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: iomanX_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
202
202
203
203
if (verbose) TYRA_LOG (" IRX: iomanX loaded!" );
204
204
205
205
if (verbose) TYRA_LOG (" IRX: Loading fileXio..." );
206
206
207
207
SifExecModuleBuffer (&fileXio_irx, size_fileXio_irx, 0 , nullptr , &ret);
208
- TYRA_ASSERT (ret >= 0 , " Failed to load module: fileXio_irx" );
208
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: fileXio_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
209
209
210
210
if (verbose) TYRA_LOG (" IRX: fileXio_irx loaded!" );
211
211
@@ -214,19 +214,19 @@ void IrxLoader::loadIO(const bool& verbose) {
214
214
void IrxLoader::loadUsbModules (const bool & verbose) {
215
215
if (verbose) TYRA_LOG (" IRX: Loading usb modules..." );
216
216
217
- int ret;
217
+ int ret, id ;
218
218
219
219
SifExecModuleBuffer (&usbd_irx, size_usbd_irx, 0 , nullptr , &ret);
220
- TYRA_ASSERT (ret >= 0 , " Failed to load module: usbd_irx" );
220
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: usbd_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
221
221
222
222
SifExecModuleBuffer (&bdm_irx, size_bdm_irx, 0 , nullptr , &ret);
223
- TYRA_ASSERT (ret >= 0 , " Failed to load module: bdm_irx" );
223
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: bdm_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
224
224
225
225
SifExecModuleBuffer (&bdmfs_fatfs_irx, size_bdmfs_fatfs_irx, 0 , nullptr , &ret);
226
- TYRA_ASSERT (ret >= 0 , " Failed to load module: bdmfs_fatfs " );
226
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: bdmfs_fatfs_irx " , IrxLoader::GetIrxErrorDescription (id, ret) );
227
227
228
228
SifExecModuleBuffer (&usbmass_bd_irx, size_usbmass_bd_irx, 0 , nullptr , &ret);
229
- TYRA_ASSERT (ret >= 0 , " Failed to load module: usbmass " );
229
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: usbmass_bd_irx " , IrxLoader::GetIrxErrorDescription (id, ret) );
230
230
231
231
waitUntilUsbDeviceIsReady ();
232
232
@@ -236,29 +236,29 @@ void IrxLoader::loadUsbModules(const bool& verbose) {
236
236
void IrxLoader::loadAudsrv (const bool & verbose) {
237
237
if (verbose) TYRA_LOG (" IRX: Loading audsrv..." );
238
238
239
- int ret;
239
+ int ret, id ;
240
240
SifExecModuleBuffer (&audsrv_irx, size_audsrv_irx, 0 , nullptr , &ret);
241
- TYRA_ASSERT (ret >= 0 , " Failed to load module: audsrv_irx" );
241
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: audsrv_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
242
242
243
243
if (verbose) TYRA_LOG (" IRX: Audsrv loaded!" );
244
244
}
245
245
246
246
void IrxLoader::loadSio2man (const bool & verbose) {
247
247
if (verbose) TYRA_LOG (" IRX: Loading sio2man..." );
248
248
249
- int ret;
249
+ int ret, id ;
250
250
SifExecModuleBuffer (&sio2man_irx, size_sio2man_irx, 0 , nullptr , &ret);
251
- TYRA_ASSERT (ret >= 0 , " Failed to load module: sio2man_irx" );
251
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: sio2man_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
252
252
253
253
if (verbose) TYRA_LOG (" IRX: Sio2man loaded!" );
254
254
}
255
255
256
256
void IrxLoader::loadPadman (const bool & verbose) {
257
257
if (verbose) TYRA_LOG (" IRX: Loading padman..." );
258
258
259
- int ret;
259
+ int ret, id ;
260
260
SifExecModuleBuffer (&padman_irx, size_padman_irx, 0 , nullptr , &ret);
261
- TYRA_ASSERT (ret >= 0 , " Failed to load module: padman_irx" );
261
+ TYRA_ASSERT (ret == 1 || id < 0 , " Failed to load module: padman_irx" , IrxLoader::GetIrxErrorDescription (id, ret) );
262
262
263
263
if (verbose) TYRA_LOG (" IRX: Padman loaded!" );
264
264
}
0 commit comments