diff options
| -rw-r--r-- | macosx/Psx-Memcard/GetMetadataForFile.m | 12 | ||||
| -rw-r--r-- | macosx/Source/HotkeyController.m | 6 | ||||
| -rw-r--r-- | macosx/Source/hotkeys.m | 10 |
3 files changed, 15 insertions, 13 deletions
diff --git a/macosx/Psx-Memcard/GetMetadataForFile.m b/macosx/Psx-Memcard/GetMetadataForFile.m index ac0722a7..41e0e224 100644 --- a/macosx/Psx-Memcard/GetMetadataForFile.m +++ b/macosx/Psx-Memcard/GetMetadataForFile.m @@ -12,11 +12,11 @@ #include "sio.h" #define MAX_MEMCARD_BLOCKS 15 -#define kPCSXRSaveNames @"com_codeplex_pcsxr_memcard_savenames" -#define kPCSXRMemCount @"com_codeplex_pcsxr_memcard_memcount" -#define kPCSXRFreeBlocks @"com_codeplex_pcsxr_memcard_freeblocks" -#define kPCSXRMemNames @"com_codeplex_pcsxr_memcard_memnames" -#define kPCSXRMemIDs @"com_codeplex_pcsxr_memcard_memids" +#define kPCSXRSaveNames @"com_codeplex_pcsxr_memcard_savenames" +#define kPCSXRMemCount @"com_codeplex_pcsxr_memcard_memcount" +#define kPCSXRFreeBlocks @"com_codeplex_pcsxr_memcard_freeblocks" +#define kPCSXRMemNames @"com_codeplex_pcsxr_memcard_memnames" +#define kPCSXRMemIDs @"com_codeplex_pcsxr_memcard_memids" //============================================================================== // @@ -191,13 +191,11 @@ Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attribute } memCount++; freeBlocks -= x; - //enName = [@(memBlock.Title) stringByTrimmingCharactersInSet:theCharSet]; jpName = [[NSString alloc] initWithCString:memBlock.sTitle encoding:NSShiftJISStringEncoding]; jpName = [jpName stringByTrimmingCharactersInSet:theCharSet]; memName = @(memBlock.Name); memID = @(memBlock.ID); - //[enNames addObject:enName]; [jpNames addObject:jpName]; [memNames addObject:memName]; [memIDs addObject:memID]; diff --git a/macosx/Source/HotkeyController.m b/macosx/Source/HotkeyController.m index 58ec0fdd..ce3561c0 100644 --- a/macosx/Source/HotkeyController.m +++ b/macosx/Source/HotkeyController.m @@ -136,9 +136,9 @@ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults] ; NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:@"HotkeyBindings"]]; [tempUserMappings setValue:@{@"device": device, - @"deviceName": deviceLabel, - @"keyCode": keyCode, - @"keyLabel": keyLabel} forKey:keyIdent]; + @"deviceName": deviceLabel, + @"keyCode": keyCode, + @"keyLabel": keyLabel} forKey:keyIdent]; [defaults setValue:tempUserMappings forKey:@"HotkeyBindings"]; } 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() { |
