summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-11-21 23:11:11 -0800
committerMichael Pavone <pavone@retrodev.com>2017-11-21 23:11:11 -0800
commit4f5d059cb030c530fa5042256a64223526be405b (patch)
tree938d28b18cf1ca6c5122218e22d7167b3a617511
parent2ef80983d5d11aec60c4a4fbe0958a261e42fb6b (diff)
Basic support for loading ROMs via Nuklear UI
--HG-- branch : nuklear_ui
-rw-r--r--m68k_core.c1
-rw-r--r--nuklear_ui/blastem_nuklear.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/m68k_core.c b/m68k_core.c
index 1f23c07..db0e056 100644
--- a/m68k_core.c
+++ b/m68k_core.c
@@ -1168,7 +1168,6 @@ void start_68k_context(m68k_context * context, uint32_t address)
{
code_ptr addr = get_native_address_trans(context, address);
m68k_options * options = context->options;
- context->should_return = 0;
options->start_context(addr, context);
}
diff --git a/nuklear_ui/blastem_nuklear.c b/nuklear_ui/blastem_nuklear.c
index 9085b38..80d6474 100644
--- a/nuklear_ui/blastem_nuklear.c
+++ b/nuklear_ui/blastem_nuklear.c
@@ -48,15 +48,16 @@ void view_load(struct nk_context *context)
}
nk_layout_row_static(context, 52, 300, 1);
if (nk_button_label(context, "Open")) {
+ char const *pieces[] = {current_path, PATH_SEP, entries[selected_entry].name};
if (entries[selected_entry].is_dir) {
char *old = current_path;
- char const *pieces[] = {old, PATH_SEP, entries[selected_entry].name};
current_path = alloc_concat_m(3, pieces);
free(old);
free_dir_list(entries, num_entries);
entries = NULL;
} else {
- //TODO: load ROM
+ current_system->next_rom = alloc_concat_m(3, pieces);
+ current_system->request_exit(current_system);
current_view = view_play;
}
}