diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-08-23 21:18:17 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-08-23 21:18:17 -0700 |
commit | facf0dd0e1606223da276bbf3984c55ca84e83d9 (patch) | |
tree | 1034b38f7f86d1f9a6de1ae7ae1d8cbef01d2930 /menu.c | |
parent | f46eaaf8651d2c763de76ce82999d9d7e1230719 (diff) |
Allow reloading current ROM with a hotkey (default F5) and allow locking on a cartridge via menu
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -365,12 +365,19 @@ void * menu_write_w(uint32_t address, void * context, uint16_t value) } break; } - case 2: { + case 2: + case 8: { char buf[4096]; copy_string_from_guest(m68k, dst, buf, sizeof(buf)); char const *pieces[] = {menu->curpath, PATH_SEP, buf}; - gen->header.next_rom = alloc_concat_m(3, pieces); - m68k->should_return = 1; + char *selected = alloc_concat_m(3, pieces); + if ((address >> 2) == 2) { + gen->header.next_rom = selected; + m68k->should_return = 1; + } else { + lockon_media(selected); + free(selected); + } break; } case 3: { |