Skip to content

Commit

Permalink
Reset emulator on game load before stopping (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara authored Aug 10, 2024
1 parent 68647af commit d7a5a59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions skytemple_ssb_debugger/controller/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@


class MainController:

def __init__(self, builder: Gtk.Builder, window: Gtk.Window, control_context: AbstractDebuggerControlContext):
self.builder = builder
self.window = window
Expand Down Expand Up @@ -982,10 +982,10 @@ def on_spin_alloc_table_nb_value_changed(self, widget):
except ValueError:
val = -1
self.global_state_controller.change_current_table(val)

def on_global_state_reload_clicked(self, *args):
self.global_state_controller.sync()

def on_global_state_alloc_dump_clicked(self, *args):
active_rows: list[Gtk.TreePath] = builder_get_assert(self.builder, Gtk.TreeView, 'global_state_alloc_treeview').get_selection().get_selected_rows()[1]
if len(active_rows) >= 1:
Expand Down Expand Up @@ -1134,6 +1134,7 @@ def load_rom(self):
self.local_variable_controller.init(rom_data)
self.editor_notebook.init(self.ssb_fm, rom_data)
self.rom_was_loaded = True
self.emu_reset()
except BaseException as ex:
self.context.display_error(
sys.exc_info(),
Expand Down

0 comments on commit d7a5a59

Please sign in to comment.