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
This commit is contained in:
parent
686c07333d
commit
6d22fc23d2
|
@ -12,11 +12,11 @@
|
||||||
#include "sio.h"
|
#include "sio.h"
|
||||||
|
|
||||||
#define MAX_MEMCARD_BLOCKS 15
|
#define MAX_MEMCARD_BLOCKS 15
|
||||||
#define kPCSXRSaveNames @"com_codeplex_pcsxr_memcard_savenames"
|
#define kPCSXRSaveNames @"com_codeplex_pcsxr_memcard_savenames"
|
||||||
#define kPCSXRMemCount @"com_codeplex_pcsxr_memcard_memcount"
|
#define kPCSXRMemCount @"com_codeplex_pcsxr_memcard_memcount"
|
||||||
#define kPCSXRFreeBlocks @"com_codeplex_pcsxr_memcard_freeblocks"
|
#define kPCSXRFreeBlocks @"com_codeplex_pcsxr_memcard_freeblocks"
|
||||||
#define kPCSXRMemNames @"com_codeplex_pcsxr_memcard_memnames"
|
#define kPCSXRMemNames @"com_codeplex_pcsxr_memcard_memnames"
|
||||||
#define kPCSXRMemIDs @"com_codeplex_pcsxr_memcard_memids"
|
#define kPCSXRMemIDs @"com_codeplex_pcsxr_memcard_memids"
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//
|
//
|
||||||
|
@ -191,13 +191,11 @@ Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attribute
|
||||||
}
|
}
|
||||||
memCount++;
|
memCount++;
|
||||||
freeBlocks -= x;
|
freeBlocks -= x;
|
||||||
//enName = [@(memBlock.Title) stringByTrimmingCharactersInSet:theCharSet];
|
|
||||||
jpName = [[NSString alloc] initWithCString:memBlock.sTitle encoding:NSShiftJISStringEncoding];
|
jpName = [[NSString alloc] initWithCString:memBlock.sTitle encoding:NSShiftJISStringEncoding];
|
||||||
jpName = [jpName stringByTrimmingCharactersInSet:theCharSet];
|
jpName = [jpName stringByTrimmingCharactersInSet:theCharSet];
|
||||||
memName = @(memBlock.Name);
|
memName = @(memBlock.Name);
|
||||||
memID = @(memBlock.ID);
|
memID = @(memBlock.ID);
|
||||||
|
|
||||||
//[enNames addObject:enName];
|
|
||||||
[jpNames addObject:jpName];
|
[jpNames addObject:jpName];
|
||||||
[memNames addObject:memName];
|
[memNames addObject:memName];
|
||||||
[memIDs addObject:memID];
|
[memIDs addObject:memID];
|
||||||
|
|
|
@ -136,9 +136,9 @@
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults] ;
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults] ;
|
||||||
NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:@"HotkeyBindings"]];
|
NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:@"HotkeyBindings"]];
|
||||||
[tempUserMappings setValue:@{@"device": device,
|
[tempUserMappings setValue:@{@"device": device,
|
||||||
@"deviceName": deviceLabel,
|
@"deviceName": deviceLabel,
|
||||||
@"keyCode": keyCode,
|
@"keyCode": keyCode,
|
||||||
@"keyLabel": keyLabel} forKey:keyIdent];
|
@"keyLabel": keyLabel} forKey:keyIdent];
|
||||||
[defaults setValue:tempUserMappings forKey:@"HotkeyBindings"];
|
[defaults setValue:tempUserMappings forKey:@"HotkeyBindings"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,10 +126,14 @@ void attachHotkeys() {
|
||||||
|
|
||||||
// GPU key presses
|
// GPU key presses
|
||||||
NSEvent* (^gpuKeypress)(NSEvent*) = ^(NSEvent *event) {
|
NSEvent* (^gpuKeypress)(NSEvent*) = ^(NSEvent *event) {
|
||||||
GPU_keypressed([event keyCode]);
|
if (event.modifierFlags & NSControlKeyMask) {
|
||||||
return (NSEvent*)nil;
|
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() {
|
void detachHotkeys() {
|
||||||
|
|
Loading…
Reference in New Issue