comparison bindings.c @ 2409:f8ce89498e11

Fix some further fallout of ZIP reload fix
author Michael Pavone <pavone@retrodev.com>
date Wed, 03 Jan 2024 19:45:23 -0800
parents e836cf11783b
children
comparison
equal deleted inserted replaced
2408:130106f5c87a 2409:f8ce89498e11
388 current_system->soft_reset(current_system); 388 current_system->soft_reset(current_system);
389 } 389 }
390 break; 390 break;
391 case UI_RELOAD: 391 case UI_RELOAD:
392 if (allow_content_binds) { 392 if (allow_content_binds) {
393 system_media *lock = current_media()->chain; 393 reload_media();
394 if (lock) {
395 const char* parts[] = {lock->dir, PATH_SEP, lock->name, ".", lock->extension};
396 char const **start = parts[0] ? parts : parts + 2;
397 int num_parts = parts[0] ? 5 : 3;
398 if (!parts[4]) {
399 num_parts -= 2;
400 }
401 char *path = alloc_concat_m(num_parts, start);
402 lockon_media(path);
403 free(path);
404 } else {
405 reload_media();
406 }
407 } 394 }
408 break; 395 break;
409 case UI_SMS_PAUSE: 396 case UI_SMS_PAUSE:
410 if (allow_content_binds && current_system->gamepad_down) { 397 if (allow_content_binds && current_system->gamepad_down) {
411 current_system->gamepad_down(current_system, GAMEPAD_MAIN_UNIT, MAIN_UNIT_PAUSE); 398 current_system->gamepad_down(current_system, GAMEPAD_MAIN_UNIT, MAIN_UNIT_PAUSE);