Merge branch 'master' into timing
This commit is contained in:
commit
487c063d48
@ -174,11 +174,11 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
|
||||
- (void) vblank
|
||||
{
|
||||
self.view.mouseHidingEnabled = (self.mainWindow.styleMask & NSFullScreenWindowMask) != 0;
|
||||
[self.view flip];
|
||||
GB_set_pixels_output(&gb, self.view.pixels);
|
||||
if (self.vramWindow.isVisible) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.view.mouseHidingEnabled = (self.mainWindow.styleMask & NSFullScreenWindowMask) != 0;
|
||||
[self reloadVRAMData: nil];
|
||||
});
|
||||
}
|
||||
@ -196,7 +196,6 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
self.audioClient = [[GBAudioClient alloc] initWithRendererBlock:^(UInt32 sampleRate, UInt32 nFrames, GB_sample_t *buffer) {
|
||||
GB_apu_copy_buffer(&gb, buffer, nFrames);
|
||||
} andSampleRate:96000];
|
||||
self.view.mouseHidingEnabled = (self.mainWindow.styleMask & NSFullScreenWindowMask) != 0;
|
||||
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"Mute"]) {
|
||||
[self.audioClient start];
|
||||
}
|
||||
@ -225,6 +224,7 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
- (void) start
|
||||
{
|
||||
if (running) return;
|
||||
self.view.mouseHidingEnabled = (self.mainWindow.styleMask & NSFullScreenWindowMask) != 0;
|
||||
[[[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil] start];
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,9 @@
|
||||
GB_set_clock_multiplier(_gb, clockMultiplier);
|
||||
}
|
||||
current_buffer = (current_buffer + 1) % self.numberOfBuffers;
|
||||
[self setNeedsDisplay:YES];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self setNeedsDisplay:YES];
|
||||
});
|
||||
}
|
||||
|
||||
- (uint32_t *) pixels
|
||||
@ -204,7 +206,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (!handled) {
|
||||
if (!handled && [theEvent type] != NSEventTypeFlagsChanged) {
|
||||
[super keyDown:theEvent];
|
||||
}
|
||||
}
|
||||
@ -238,7 +240,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (!handled) {
|
||||
if (!handled && [theEvent type] != NSEventTypeFlagsChanged) {
|
||||
[super keyUp:theEvent];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user