Skip to content

Commit

Permalink
PyBoyPlugin Cython move cgb attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
BackrndSource authored and Baekalfen committed Feb 12, 2025
1 parent a030553 commit 18b656e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions pyboy/plugins/base_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, pyboy, mb, pyboy_argv):
self.pyboy = pyboy
self.mb = mb
self.pyboy_argv = pyboy_argv
self.cgb = mb.cgb

def __cinit__(self, pyboy, mb, pyboy_argv, *args, **kwargs):
self.pyboy = pyboy
Expand Down
3 changes: 0 additions & 3 deletions pyboy/plugins/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ def __init__(self, pyboy, mb, pyboy_argv):
if not self.enabled():
return

self.cgb = mb.cartridge_cgb

self.sdl2_event_pump = self.pyboy_argv.get("window") != "SDL2"
if self.sdl2_event_pump:
sdl2.SDL_Init(sdl2.SDL_INIT_VIDEO)
Expand Down Expand Up @@ -238,7 +236,6 @@ def make_buffer(w, h, depth=4):
class BaseDebugWindow(PyBoyWindowPlugin):
def __init__(self, pyboy, mb, pyboy_argv, *, scale, title, width, height, pos_x, pos_y):
super().__init__(pyboy, mb, pyboy_argv)
self.cgb = mb.cgb
self.scale = scale
self.width, self.height = width, height
self.base_title = title
Expand Down

0 comments on commit 18b656e

Please sign in to comment.