mirror of https://github.com/snes9xgit/snes9x.git
Mac: Make escape key resume as well as pause
This commit is contained in:
parent
c4cdc18068
commit
eefd3033cd
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15400" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15400"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17154"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
</textField>
|
</textField>
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="drA-2C-LPt">
|
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="drA-2C-LPt">
|
||||||
<rect key="frame" x="230" y="443" width="151" height="16"/>
|
<rect key="frame" x="230" y="443" width="151" height="16"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Escape" id="tle-rH-QLe">
|
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Pause/Resume" id="tle-rH-QLe">
|
||||||
<font key="font" usesAppearanceFont="YES"/>
|
<font key="font" usesAppearanceFont="YES"/>
|
||||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
|
|
@ -295,6 +295,7 @@ struct GameViewInfo
|
||||||
static volatile bool8 rejectinput = false;
|
static volatile bool8 rejectinput = false;
|
||||||
|
|
||||||
static bool8 pauseEmulation = false,
|
static bool8 pauseEmulation = false,
|
||||||
|
escKeyDown = false,
|
||||||
frameAdvance = false;
|
frameAdvance = false;
|
||||||
|
|
||||||
static int frameCount = 0;
|
static int frameCount = 0;
|
||||||
|
@ -2245,7 +2246,10 @@ static void ProcessInput (void)
|
||||||
|
|
||||||
if (ISpKeyIsPressed(keys, gamepadButtons, kISpEsc))
|
if (ISpKeyIsPressed(keys, gamepadButtons, kISpEsc))
|
||||||
{
|
{
|
||||||
pauseEmulation = true;
|
if (!escKeyDown)
|
||||||
|
{
|
||||||
|
escKeyDown = true;
|
||||||
|
pauseEmulation = !pauseEmulation;
|
||||||
[s9xView updatePauseOverlay];
|
[s9xView updatePauseOverlay];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^
|
dispatch_async(dispatch_get_main_queue(), ^
|
||||||
|
@ -2253,6 +2257,11 @@ static void ProcessInput (void)
|
||||||
[s9xView setNeedsDisplay:YES];
|
[s9xView setNeedsDisplay:YES];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
escKeyDown = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (ISpKeyIsPressed(keys, gamepadButtons, kISpFreeze))
|
if (ISpKeyIsPressed(keys, gamepadButtons, kISpFreeze))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue