SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit c3586ef7ca7755895e59678d251dfbb85c384359 parent 939dd6ad5b6205a816b1a151e8f3895aa324de62 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 3 Oct 2025 22:19:59 +0300 Fixed a bug causing closed ROMs to run in background Diffstat:
| M | Cocoa/Document.m | 20 | +++++++++++++++++++- |
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -17,6 +17,24 @@ #import "GBHexStatusBarRepresenter.h" #import "NSObject+DefaultsObserver.h" +void *AllocationAt(uintptr_t x) +{ + size_t malloc_size(const void *ptr); + uintptr_t t = x & ~7; + for (unsigned i = 0; i < 128; i++) { + size_t size = malloc_size((void *)t); + if (!size) { + t -= 8; + continue; + } + if (x < t + size) { + return (void *)t; + } + return NULL; + } + return NULL; +} + #define likely(x) GB_likely(x) #define unlikely(x) GB_unlikely(x) @@ -348,7 +366,7 @@ static void debuggerReloadCallback(GB_gameboy_t *gb) }]; [self observeStandardDefaultsKey:@"GBTurboCap" withBlock:^(NSNumber *value) { - if (!_master) { + if (!weakSelf->_master) { GB_set_turbo_cap(gb, value.doubleValue); } }];
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.