From 0ac328d91e46fb051f4207af75b1b22f4e17246e Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Mon, 3 Jul 2023 20:47:20 +0200 Subject: [PATCH] cleanup --- extras/menus/arkMenu/src/usb.cpp | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/extras/menus/arkMenu/src/usb.cpp b/extras/menus/arkMenu/src/usb.cpp index 58ef9e898..93ffea04d 100644 --- a/extras/menus/arkMenu/src/usb.cpp +++ b/extras/menus/arkMenu/src/usb.cpp @@ -13,9 +13,7 @@ extern "C" { int pspUsbDeviceFinishDevice(); } -static void load_start_usbdevice(void) -{ - +static void start_psp_usb(){ int res; static char* mods[] = { @@ -28,39 +26,21 @@ static void load_start_usbdevice(void) }; for (int i=0; i<6; i++){ - printf("loading %s\n", mods[i]); int mid = kuKernelLoadModule(mods[i], 0, NULL); - printf("mod id: %p\n", mid); sceKernelStartModule(mid, 0, NULL, NULL, NULL); } - res = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0); - printf("usbStart bus: %p\n", res); - res = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0); - printf("usbStart store: %p\n", res); - res = sceUsbActivate(0x1c8); - printf("usbActivate: %p\n", res); + sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0); + sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0); + sceUsbActivate(0x1c8); } -static void stop_unload_usbdevice(void) -{ - sceUsbDeactivate(0x1c8); +static void stop_psp_usb(){ + sceUsbDeactivate(0x1c8); sceUsbStop(PSP_USBSTOR_DRIVERNAME, 0, 0); sceUsbStop(PSP_USBBUS_DRIVERNAME, 0, 0); } -static void start_psp_usb(){ - struct KernelCallArg args; - void* startUsb = (void*)&load_start_usbdevice; - kuKernelCall(startUsb, &args); -} - -static void stop_psp_usb(){ - struct KernelCallArg args; - void* stopUsb = (void*)&stop_unload_usbdevice; - kuKernelCall(stopUsb, &args); -} - static void start_adrenaline_usb(){ struct KernelCallArg args; void* startUsb = (void*)sctrlHENFindFunction("ARKCompatLayer", "AdrenalineCtrl", 0x80C0ED7B);