summaryrefslogtreecommitdiff
path: root/macosx/Source/hotkeys.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2015-01-18 02:01:44 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2015-01-18 02:01:44 +0000
commit6d22fc23d241b17c059b4582741bb49787c324a1 (patch)
treeb67df5e482d33d554db6d56fdf31c7c15035620e /macosx/Source/hotkeys.m
parent686c07333da1774c7bac2d547a7728e0b0d4c29b (diff)
downloadpcsxr-6d22fc23d241b17c059b4582741bb49787c324a1.tar.gz
OS X: Fix pressing "i" making the emulator speeding up.
This was caused by gpuKeypress in HandleKey to interpret the I key as GPU_FRAME_LIMIT. Having the block check for the NSControlKeyMask fixes this. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@92900 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Source/hotkeys.m')
-rw-r--r--macosx/Source/hotkeys.m10
1 files changed, 7 insertions, 3 deletions
diff --git a/macosx/Source/hotkeys.m b/macosx/Source/hotkeys.m
index 70e3ae15..96d89e8b 100644
--- a/macosx/Source/hotkeys.m
+++ b/macosx/Source/hotkeys.m
@@ -126,10 +126,14 @@ void attachHotkeys() {
// GPU key presses
NSEvent* (^gpuKeypress)(NSEvent*) = ^(NSEvent *event) {
- GPU_keypressed([event keyCode]);
- return (NSEvent*)nil;
+ if (event.modifierFlags & NSControlKeyMask) {
+ GPU_keypressed([event keyCode]);
+ return (NSEvent*)nil;
+ } else {
+ return event;
+ }
};
- gpuMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:(NSKeyUpMask | NSControlKeyMask) handler:gpuKeypress];
+ gpuMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSKeyUpMask handler:gpuKeypress];
}
void detachHotkeys() {