I figured out bgx enough to add some options.

This commit is contained in:
Kelvin Sherlock 2020-09-06 15:26:20 -04:00
parent 9a64879336
commit ee02dee982
2 changed files with 115 additions and 17 deletions

View File

@ -118,23 +118,12 @@ DQ
<binding destination="-2" name="value" keyPath="self.mameSquarePixels" id="BiP-wC-Hpn"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zoQ-mU-ARl">
<rect key="frame" x="315" y="60" width="67" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="No Blur" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="r3s-5h-Xv5">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="-2" name="value" keyPath="self.mameNoBlur" id="Pvn-zw-OsQ"/>
</connections>
</button>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FE4-gG-fPb">
<rect key="frame" x="62" y="87" width="107" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="100%" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="yoI-Ra-evu" id="M40-f0-awc">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="8Tv-0j-JhQ">
<items>
<menuItem title="100%" state="on" tag="1" id="yoI-Ra-evu"/>
@ -262,6 +251,83 @@ DQ
</subviews>
</view>
</tabViewItem>
<tabViewItem label="BGFX" identifier="" id="zUN-Qs-haG">
<view key="view" id="QQT-HS-xjI">
<rect key="frame" x="10" y="33" width="672" height="114"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pD8-dV-ijg">
<rect key="frame" x="79" y="61" width="172" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="Default" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="g0W-Ka-7bb" id="ceP-aK-me8">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<menu key="menu" id="ajo-1k-sbD">
<items>
<menuItem title="Default" state="on" id="g0W-Ka-7bb"/>
<menuItem title="Metal" tag="1" id="93g-cb-opl"/>
<menuItem title="OpenGL" tag="2" id="B1R-9E-dMw"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<binding destination="-2" name="enabled" keyPath="self.mameBGFX" id="ZuQ-OY-TrP"/>
<binding destination="-2" name="selectedIndex" keyPath="self.mameBackend" id="oE1-Ho-H22"/>
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qGO-Pm-SD1">
<rect key="frame" x="15" y="67" width="60" height="16"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Backend:" id="WDr-Pl-lV1">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ctE-fX-twN">
<rect key="frame" x="15" y="38" width="51" height="16"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Effects:" id="Sqk-7k-PxQ">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="826-p8-in8">
<rect key="frame" x="15" y="91" width="57" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="BGFX" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="Ubs-KZ-mpu">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="-2" name="value" keyPath="self.mameBGFX" id="9Ua-MZ-qbe"/>
</connections>
</button>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hM8-FM-Agh">
<rect key="frame" x="79" y="32" width="172" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="Default" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="Dsm-bi-Txy" id="mBS-h4-BWC">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<menu key="menu" id="WdF-Hw-YI9">
<items>
<menuItem title="Default" state="on" id="Dsm-bi-Txy"/>
<menuItem title="Unfiltered" tag="1" id="xgz-We-TFg"/>
<menuItem title="HLSL" tag="2" id="1UE-ea-V9a"/>
<menuItem title="CRT Geometry" tag="3" id="Dsx-wI-m3r"/>
<menuItem title="CRT Geometry Deluxe" tag="4" id="Ylw-Of-TM5"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<binding destination="-2" name="enabled" keyPath="self.mameBGFX" id="DVB-Ex-VYF"/>
<binding destination="-2" name="selectedIndex" keyPath="self.mameEffects" id="rCg-d6-OR6"/>
</connections>
</popUpButton>
</subviews>
</view>
</tabViewItem>
</tabViewItems>
</tabView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="J9O-xI-P5J" customClass="FlippedView">

View File

@ -47,6 +47,11 @@ static NSString *kContextMachine = @"kContextMachine";
@property NSInteger mameSpeed;
@property BOOL mameBGFX;
@property NSInteger mameBackend;
@property NSInteger mameEffects;
@end
@ -58,6 +63,7 @@ static NSString *kContextMachine = @"kContextMachine";
-(void)windowWillLoad {
[self setMameSpeed: 1];
[self setMameBGFX: YES];
}
- (void)windowDidLoad {
@ -78,6 +84,7 @@ static NSString *kContextMachine = @"kContextMachine";
@"mameAVI", @"mameAVIPath",
@"mameWAV", @"mameWAVPath",
@"mameVGM", @"mameVGMPath",
@"mameBGFX", @"mameBackend", @"mameEffects",
];
for (NSString *key in keys) {
@ -249,12 +256,37 @@ static NSString * JoinArguments(NSArray *argv) {
[argv addObject: @"-aspect"];
[argv addObject: aspect];
if (_mameNoBlur) {
[argv addObject: @"-video"];
[argv addObject: @"soft"];
}
}
if (_mameBGFX) {
if (_mameBackend) {
static NSString *Names[] = {
@"-",
@"metal",
@"opengl",
};
[argv addObject: @"-bgfx_backend"];
[argv addObject: Names[_mameBackend]];
}
if (_mameEffects) {
static NSString *Names[] = {
@"-",
@"unfiltered",
@"hlsl",
@"crt-geom",
@"crt-geom-deluxe",
};
[argv addObject: @"-bgfx_screen_chains"];
[argv addObject: Names[_mameEffects]];
}
} else {
[argv addObject: @"-video"];
[argv addObject: @"soft"];
}
// -speed n
// -scale n