[SC64][SW] Release SD lock on init error

This commit is contained in:
Mateusz Faderewski 2024-09-29 21:14:32 +02:00
parent 74e20cb8cc
commit db4f16754f
2 changed files with 6 additions and 0 deletions

View File

@ -655,6 +655,9 @@ void cfg_process (void) {
led_activity_on(); led_activity_on();
error = sd_card_init(); error = sd_card_init();
led_activity_off(); led_activity_off();
if (error != SD_OK) {
sd_release_lock(SD_LOCK_N64);
}
} }
break; break;

View File

@ -404,6 +404,9 @@ static void usb_rx_process (void) {
led_activity_on(); led_activity_on();
error = sd_card_init(); error = sd_card_init();
led_activity_off(); led_activity_off();
if (error != SD_OK) {
sd_release_lock(SD_LOCK_USB);
}
} }
break; break;