Mercurial > repos > blastem
diff bindings.c @ 2162:1270fe86eb89
Add Quick Load binding
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 09 Jun 2022 09:35:38 -0700 |
parents | 372625dd9590 |
children | 0c723b8b637c |
line wrap: on
line diff
--- a/bindings.c Tue May 24 18:49:38 2022 -0700 +++ b/bindings.c Thu Jun 09 09:35:38 2022 -0700 @@ -26,6 +26,7 @@ UI_DEBUG_MODE_INC, UI_ENTER_DEBUGGER, UI_SAVE_STATE, + UI_LOAD_STATE, UI_SET_SPEED, UI_NEXT_SPEED, UI_PREV_SPEED, @@ -325,6 +326,11 @@ current_system->save_state = QUICK_SAVE_SLOT+1; } break; + case UI_LOAD_STATE: + if (allow_content_binds) { + current_system->load_state(current_system, QUICK_SAVE_SLOT); + } + break; case UI_NEXT_SPEED: if (allow_content_binds) { current_speed++; @@ -630,6 +636,8 @@ *subtype_a = UI_ENTER_DEBUGGER; } else if(!strcmp(target + 3, "save_state")) { *subtype_a = UI_SAVE_STATE; + } else if(!strcmp(target + 3, "load_state")) { + *subtype_a = UI_LOAD_STATE; } else if(startswith(target + 3, "set_speed.")) { *subtype_a = UI_SET_SPEED; *subtype_b = atoi(target + 3 + strlen("set_speed."));