diff --git a/pyboy/plugins/debug.py b/pyboy/plugins/debug.py index 012bbbca6..25520cad7 100644 --- a/pyboy/plugins/debug.py +++ b/pyboy/plugins/debug.py @@ -205,8 +205,14 @@ def handle_events(self, events): return events def stop(self): - if self.sdl2_event_pump: - sdl2.SDL_Quit() + self.tile1.stop() + self.tile2.stop() + self.tiledata0.stop() + if self.cgb: + self.tiledata1.stop() + self.sprite.stop() + self.spriteview.stop() + self.memory.stop() def enabled(self): if self.pyboy_argv.get("debug"):