mirror of https://github.com/bsnes-emu/bsnes.git
Fixed rounded corners in Metal
This commit is contained in:
parent
a37a0b1b00
commit
a4bfb026a8
|
@ -314,6 +314,8 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
|||
NSMutableParagraphStyle *paragraph_style = [[NSMutableParagraphStyle alloc] init];
|
||||
[paragraph_style setLineSpacing:2];
|
||||
|
||||
self.mainWindow.backgroundColor = [NSColor blackColor];
|
||||
|
||||
self.debuggerSideViewInput.font = [NSFont userFixedPitchFontOfSize:12];
|
||||
self.debuggerSideViewInput.textColor = [NSColor whiteColor];
|
||||
self.debuggerSideViewInput.defaultParagraphStyle = paragraph_style;
|
||||
|
|
|
@ -50,16 +50,10 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="160" height="144"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView id="KTk-4M-J7t" customClass="GBBorderView">
|
||||
<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"/>
|
||||
<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>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<connections>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface GBBorderView : NSView
|
||||
|
||||
@end
|
|
@ -1,11 +0,0 @@
|
|||
#import "GBBorderView.h"
|
||||
|
||||
@implementation GBBorderView
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
[[NSColor blackColor] setFill];
|
||||
NSRectFill(dirtyRect);
|
||||
[super drawRect:dirtyRect];
|
||||
}
|
||||
|
||||
@end
|
|
@ -71,6 +71,13 @@ static const vector_float2 rect[] =
|
|||
[self loadShader];
|
||||
}
|
||||
|
||||
- (void)addSubview:(NSView *)view
|
||||
{
|
||||
/* Fixes rounded corners */
|
||||
[super addSubview:view];
|
||||
[self setWantsLayer:YES];
|
||||
}
|
||||
|
||||
- (void) loadShader
|
||||
{
|
||||
NSError *error = nil;
|
||||
|
|
Loading…
Reference in New Issue