Merge branch 'v0.11.x'
This commit is contained in:
commit
0145b790a3
@ -732,12 +732,11 @@ Preboot:
|
|||||||
|
|
||||||
ld a, [$143]
|
ld a, [$143]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
|
|
||||||
call z, EmulateDMG
|
call z, EmulateDMG
|
||||||
|
ldh [$4C], a
|
||||||
ldh a, [TitleChecksum]
|
ldh a, [TitleChecksum]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
ldh [$4C], a ; One day, I will know what this switch does and how it differs from FF6C
|
|
||||||
ldh a, [InputPalette]
|
ldh a, [InputPalette]
|
||||||
and a
|
and a
|
||||||
jr nz, .emulateDMGForCGBGame
|
jr nz, .emulateDMGForCGBGame
|
||||||
|
@ -333,9 +333,7 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
|||||||
|
|
||||||
NSMutableParagraphStyle *paragraph_style = [[NSMutableParagraphStyle alloc] init];
|
NSMutableParagraphStyle *paragraph_style = [[NSMutableParagraphStyle alloc] init];
|
||||||
[paragraph_style setLineSpacing:2];
|
[paragraph_style setLineSpacing:2];
|
||||||
|
|
||||||
self.mainWindow.backgroundColor = [NSColor blackColor];
|
|
||||||
|
|
||||||
self.debuggerSideViewInput.font = [NSFont userFixedPitchFontOfSize:12];
|
self.debuggerSideViewInput.font = [NSFont userFixedPitchFontOfSize:12];
|
||||||
self.debuggerSideViewInput.textColor = [NSColor whiteColor];
|
self.debuggerSideViewInput.textColor = [NSColor whiteColor];
|
||||||
self.debuggerSideViewInput.defaultParagraphStyle = paragraph_style;
|
self.debuggerSideViewInput.defaultParagraphStyle = paragraph_style;
|
||||||
|
@ -50,10 +50,16 @@
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="160" height="144"/>
|
<rect key="frame" x="0.0" y="0.0" width="160" height="144"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<view id="uqf-pe-VAF" customClass="GBView">
|
<customView id="KTk-4M-J7t" customClass="GBBorderView">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="160" height="144"/>
|
<rect key="frame" x="0.0" y="0.0" width="160" height="144"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
</view>
|
<subviews>
|
||||||
|
<view id="uqf-pe-VAF" customClass="GBView">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="160" height="144"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
</view>
|
||||||
|
</subviews>
|
||||||
|
</customView>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
|
5
Cocoa/GBBorderView.h
Normal file
5
Cocoa/GBBorderView.h
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
@interface GBBorderView : NSView
|
||||||
|
|
||||||
|
@end
|
26
Cocoa/GBBorderView.m
Normal file
26
Cocoa/GBBorderView.m
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#import "GBBorderView.h"
|
||||||
|
|
||||||
|
@implementation GBBorderView
|
||||||
|
|
||||||
|
|
||||||
|
- (void)awakeFromNib
|
||||||
|
{
|
||||||
|
self.wantsLayer = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)wantsUpdateLayer
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateLayer
|
||||||
|
{
|
||||||
|
/* Wonderful, wonderful windowserver(?) bug. Using 0,0,0 here would cause it to render garbage
|
||||||
|
on fullscreen windows on some High Sierra machines. Any other value, including the one used
|
||||||
|
here (which is rendered exactly the same due to rounding) works around this bug. */
|
||||||
|
self.layer.backgroundColor = [NSColor colorWithCalibratedRed:0
|
||||||
|
green:0
|
||||||
|
blue:1.0 / 1024.0
|
||||||
|
alpha:1.0].CGColor;
|
||||||
|
}
|
||||||
|
@end
|
@ -71,13 +71,6 @@ static const vector_float2 rect[] =
|
|||||||
[self loadShader];
|
[self loadShader];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)addSubview:(NSView *)view
|
|
||||||
{
|
|
||||||
/* Fixes rounded corners */
|
|
||||||
[super addSubview:view];
|
|
||||||
[self setWantsLayer:YES];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) loadShader
|
- (void) loadShader
|
||||||
{
|
{
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
|
@ -426,6 +426,14 @@ void GB_apu_copy_buffer(GB_gameboy_t *gb, GB_sample_t *dest, size_t count)
|
|||||||
dest[gb->apu_output.buffer_position + i] = output;
|
dest[gb->apu_output.buffer_position + i] = output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gb->apu_output.buffer_position) {
|
||||||
|
if (gb->apu_output.buffer_size + (count - gb->apu_output.buffer_position) < count * 3) {
|
||||||
|
gb->apu_output.buffer_size += count - gb->apu_output.buffer_position;
|
||||||
|
gb->apu_output.buffer = realloc(gb->apu_output.buffer,
|
||||||
|
gb->apu_output.buffer_size * sizeof(*gb->apu_output.buffer));
|
||||||
|
gb->apu_output.stream_started = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
count = gb->apu_output.buffer_position;
|
count = gb->apu_output.buffer_position;
|
||||||
}
|
}
|
||||||
memcpy(dest, gb->apu_output.buffer, count * sizeof(*gb->apu_output.buffer));
|
memcpy(dest, gb->apu_output.buffer, count * sizeof(*gb->apu_output.buffer));
|
||||||
|
4
Makefile
4
Makefile
@ -21,7 +21,7 @@ ifeq ($(MAKECMDGOALS),)
|
|||||||
MAKECMDGOALS := $(DEFAULT)
|
MAKECMDGOALS := $(DEFAULT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VERSION := 0.11
|
VERSION := 0.11.1
|
||||||
export VERSION
|
export VERSION
|
||||||
CONF ?= debug
|
CONF ?= debug
|
||||||
|
|
||||||
@ -306,4 +306,4 @@ libretro:
|
|||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
.PHONY: libretro
|
.PHONY: libretro
|
||||||
|
Loading…
Reference in New Issue
Block a user