mirror of
https://github.com/ksherlock/ample.git
synced 2024-10-31 15:04:56 +00:00
add 4x window option, aspect ratio for oric square pixels.
This commit is contained in:
parent
bdd9df44ed
commit
308b15277c
@ -159,10 +159,21 @@
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="m4N-Qw-mem">
|
||||
<items>
|
||||
<menuItem title="Full Screen" state="on" id="0zZ-Ib-Fne"/>
|
||||
<menuItem title="Window 1x" id="3bZ-rq-fCt"/>
|
||||
<menuItem title="Window 2x" id="KA4-Rs-yyK"/>
|
||||
<menuItem title="Window 3x" id="Dbh-Js-pMx" userLabel="Window 3x"/>
|
||||
<menuItem title="Full Screen" state="on" id="0zZ-Ib-Fne">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Window 1x" id="3bZ-rq-fCt">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Window 2x" id="KA4-Rs-yyK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Window 3x" id="Dbh-Js-pMx" userLabel="Window 3x">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Window 4x" id="GCs-En-3Jv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
|
@ -25,6 +25,20 @@ static NSString *kMyContext = @"kMyContext";
|
||||
static NSString *kContextMachine = @"kContextMachine";
|
||||
|
||||
|
||||
static NSString *NeedsAspectRatio(NSString *machine) {
|
||||
static NSDictionary *dict = nil;
|
||||
|
||||
if (!dict) {
|
||||
dict = @{
|
||||
@"oric1": @"2:1",
|
||||
@"orica": @"2:1",
|
||||
@"prav8d": @"2:1",
|
||||
@"telstrat": @"2:1",
|
||||
};
|
||||
}
|
||||
return [dict objectForKey: machine];
|
||||
}
|
||||
|
||||
@interface LaunchWindowController () {
|
||||
BOOL _loadingBookmark;
|
||||
NSString *_machine;
|
||||
@ -500,6 +514,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||
// drop through.
|
||||
case 2: // 2x
|
||||
case 3: // 3x
|
||||
case 4: // 4x
|
||||
|
||||
if (_mameSquarePixels) {
|
||||
// NSString *aspect = [NSString stringWithFormat: @"%u:%u", (unsigned)screen.width, (unsigned)screen.height];
|
||||
@ -509,6 +524,8 @@ static NSString *ShellQuote(NSString *s) {
|
||||
float hscale = round((screen.width * 3 / 4) / screen.height);
|
||||
if (hscale < 1) hscale = 1;
|
||||
screen.height *= hscale;
|
||||
|
||||
|
||||
} else {
|
||||
screen.height = round(screen.width * 3 / 4);
|
||||
}
|
||||
@ -523,12 +540,20 @@ static NSString *ShellQuote(NSString *s) {
|
||||
[argv addObject: res];
|
||||
if (_mameSquarePixels) {
|
||||
[argv addObject: @"-nounevenstretch"];
|
||||
|
||||
NSString *aspect = NeedsAspectRatio(_machine);
|
||||
if (aspect) {
|
||||
[argv addObject: @"-aspect"];
|
||||
[argv addObject: aspect];
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (_mameBGFX) {
|
||||
[argv addObject: @"-video"];
|
||||
[argv addObject: @"bgfx"];
|
||||
|
Loading…
Reference in New Issue
Block a user