ios: Clean up input code; make wiimote remapping work.

This commit is contained in:
meancoot 2013-03-03 18:50:38 -05:00
parent 55a8333ac2
commit 08e6634eef
25 changed files with 484 additions and 387 deletions

View File

@ -8,12 +8,6 @@
/* Begin PBXBuildFile section */
96096DD816D1ABAF00BF4499 /* RAModuleInfoList.m in Sources */ = {isa = PBXBuildFile; fileRef = 96096DD716D1ABAF00BF4499 /* RAModuleInfoList.m */; };
960DB2C416E0193D00F977E3 /* BTstackManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 960DB2C216E0193D00F977E3 /* BTstackManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
960DB2C716E0197600F977E3 /* BTDiscoveryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 960DB2C616E0197600F977E3 /* BTDiscoveryViewController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
9614C6BB16DD7C00000B36EF /* BTDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 9614C6AE16DD7C00000B36EF /* BTDevice.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
9614C6BD16DD7C00000B36EF /* libBTstack.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9614C6B816DD7C00000B36EF /* libBTstack.dylib */; };
9614C6BE16DD7C00000B36EF /* WiiMoteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9614C6BA16DD7C00000B36EF /* WiiMoteHelper.m */; };
9614C6C116DD7D54000B36EF /* wiimote.c in Sources */ = {isa = PBXBuildFile; fileRef = 9614C6BF16DD7D54000B36EF /* wiimote.c */; };
9614C6C416DDC018000B36EF /* autosave.c in Sources */ = {isa = PBXBuildFile; fileRef = 96AFAE9D16C1D9A9009DE44C /* autosave.c */; };
9614C6C516DDC018000B36EF /* cheats.c in Sources */ = {isa = PBXBuildFile; fileRef = 96AFAEA016C1D9A9009DE44C /* cheats.c */; };
9614C6C616DDC018000B36EF /* command.c in Sources */ = {isa = PBXBuildFile; fileRef = 96AFAEA216C1D9A9009DE44C /* command.c */; };
@ -74,7 +68,6 @@
9614C6FD16DDC018000B36EF /* RADirectoryGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 96C19C2316D453BA00FE8D5A /* RADirectoryGrid.m */; };
9614C6FE16DDC018000B36EF /* browser.m in Sources */ = {isa = PBXBuildFile; fileRef = 96C19C2816D5A56400FE8D5A /* browser.m */; };
9614C6FF16DDC018000B36EF /* RAConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 96C19C2F16D7045700FE8D5A /* RAConfig.m */; };
9614C70016DDC018000B36EF /* ios_input.m in Sources */ = {isa = PBXBuildFile; fileRef = 965AE29D16D9BF94001D7667 /* ios_input.m */; };
9614C70616DDC018000B36EF /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96366C5816C9ACF500D64A22 /* AudioToolbox.framework */; };
9614C70716DDC018000B36EF /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96366C5416C9AC3300D64A22 /* CoreAudio.framework */; };
9614C70816DDC018000B36EF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 96AFAF2116C1DF88009DE44C /* libz.dylib */; };
@ -114,8 +107,18 @@
963F5AC716CC523B009BBD19 /* RADirectoryList.m in Sources */ = {isa = PBXBuildFile; fileRef = 963F5AC416CC523B009BBD19 /* RADirectoryList.m */; };
963F5AC816CC523B009BBD19 /* RAGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 963F5AC516CC523B009BBD19 /* RAGameView.m */; };
963F5AC916CC523B009BBD19 /* RAModuleList.m in Sources */ = {isa = PBXBuildFile; fileRef = 963F5AC616CC523B009BBD19 /* RAModuleList.m */; };
965AE29E16D9BF94001D7667 /* ios_input.m in Sources */ = {isa = PBXBuildFile; fileRef = 965AE29D16D9BF94001D7667 /* ios_input.m */; };
965AE2A016DA83C1001D7667 /* PauseIndicatorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 965AE29F16DA83C1001D7667 /* PauseIndicatorView.xib */; };
966B9C8A16E40D44005B61E1 /* ios_input.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C8616E40D44005B61E1 /* ios_input.m */; };
966B9C8B16E40D44005B61E1 /* ios_joypad.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C8716E40D44005B61E1 /* ios_joypad.m */; };
966B9C8C16E40D44005B61E1 /* RAInputResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C8916E40D44005B61E1 /* RAInputResponder.m */; };
966B9C8D16E40EFC005B61E1 /* RAInputResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C8916E40D44005B61E1 /* RAInputResponder.m */; };
966B9C8E16E40F00005B61E1 /* ios_input.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C8616E40D44005B61E1 /* ios_input.m */; };
966B9CA216E418B7005B61E1 /* BTDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C9116E418B7005B61E1 /* BTDevice.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
966B9CA316E418B7005B61E1 /* BTDiscoveryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C9316E418B7005B61E1 /* BTDiscoveryViewController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
966B9CA416E418B7005B61E1 /* BTstackManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C9C16E418B7005B61E1 /* BTstackManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
966B9CA516E418B7005B61E1 /* libBTstack.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966B9C9D16E418B7005B61E1 /* libBTstack.dylib */; };
966B9CA616E418B7005B61E1 /* wiimote.c in Sources */ = {isa = PBXBuildFile; fileRef = 966B9C9E16E418B7005B61E1 /* wiimote.c */; };
966B9CA716E418B7005B61E1 /* WiiMoteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 966B9CA116E418B7005B61E1 /* WiiMoteHelper.m */; };
969EBF6A16D95746003787A2 /* PauseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 969EBF6916D95746003787A2 /* PauseView.xib */; };
96AFAE2A16C1D4EA009DE44C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96AFAE2916C1D4EA009DE44C /* UIKit.framework */; };
96AFAE2C16C1D4EA009DE44C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96AFAE2B16C1D4EA009DE44C /* Foundation.framework */; };
@ -177,23 +180,6 @@
/* Begin PBXFileReference section */
96096DD716D1ABAF00BF4499 /* RAModuleInfoList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAModuleInfoList.m; sourceTree = "<group>"; };
960DB2C216E0193D00F977E3 /* BTstackManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTstackManager.m; sourceTree = "<group>"; };
960DB2C316E0193D00F977E3 /* BTstackManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTstackManager.h; sourceTree = "<group>"; };
960DB2C516E0197500F977E3 /* BTDiscoveryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDiscoveryViewController.h; sourceTree = "<group>"; };
960DB2C616E0197600F977E3 /* BTDiscoveryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDiscoveryViewController.m; sourceTree = "<group>"; };
9614C6AD16DD7C00000B36EF /* BTDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDevice.h; sourceTree = "<group>"; };
9614C6AE16DD7C00000B36EF /* BTDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDevice.m; sourceTree = "<group>"; };
9614C6B216DD7C00000B36EF /* btstack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btstack.h; sourceTree = "<group>"; };
9614C6B316DD7C00000B36EF /* hci_cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hci_cmds.h; sourceTree = "<group>"; };
9614C6B416DD7C00000B36EF /* linked_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linked_list.h; sourceTree = "<group>"; };
9614C6B516DD7C00000B36EF /* run_loop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = run_loop.h; sourceTree = "<group>"; };
9614C6B616DD7C00000B36EF /* sdp_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sdp_util.h; sourceTree = "<group>"; };
9614C6B716DD7C00000B36EF /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
9614C6B816DD7C00000B36EF /* libBTstack.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libBTstack.dylib; sourceTree = "<group>"; };
9614C6B916DD7C00000B36EF /* WiiMoteHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WiiMoteHelper.h; sourceTree = "<group>"; };
9614C6BA16DD7C00000B36EF /* WiiMoteHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WiiMoteHelper.m; sourceTree = "<group>"; };
9614C6BF16DD7D54000B36EF /* wiimote.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wiimote.c; sourceTree = "<group>"; };
9614C6C016DD7D54000B36EF /* wiimote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wiimote.h; sourceTree = "<group>"; };
9614C71E16DDC018000B36EF /* RetroArch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArch.app; sourceTree = BUILT_PRODUCTS_DIR; };
9614C71F16DDC018000B36EF /* RetroArch copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "RetroArch copy-Info.plist"; path = "/Users/jason/Documents/Projects/ios/RetroArch/ios/RetroArch copy-Info.plist"; sourceTree = "<absolute>"; };
962979EE16C3EA3E00E6DCE0 /* ioseagl_ctx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioseagl_ctx.c; sourceTree = "<group>"; };
@ -217,8 +203,28 @@
963F5AC416CC523B009BBD19 /* RADirectoryList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RADirectoryList.m; sourceTree = "<group>"; };
963F5AC516CC523B009BBD19 /* RAGameView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAGameView.m; sourceTree = "<group>"; };
963F5AC616CC523B009BBD19 /* RAModuleList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAModuleList.m; sourceTree = "<group>"; };
965AE29D16D9BF94001D7667 /* ios_input.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ios_input.m; sourceTree = "<group>"; };
965AE29F16DA83C1001D7667 /* PauseIndicatorView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PauseIndicatorView.xib; sourceTree = "<group>"; };
966B9C8616E40D44005B61E1 /* ios_input.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ios_input.m; sourceTree = "<group>"; };
966B9C8716E40D44005B61E1 /* ios_joypad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ios_joypad.m; sourceTree = "<group>"; };
966B9C8816E40D44005B61E1 /* RAInputResponder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAInputResponder.h; sourceTree = "<group>"; };
966B9C8916E40D44005B61E1 /* RAInputResponder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAInputResponder.m; sourceTree = "<group>"; };
966B9C9016E418B7005B61E1 /* BTDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDevice.h; sourceTree = "<group>"; };
966B9C9116E418B7005B61E1 /* BTDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDevice.m; sourceTree = "<group>"; };
966B9C9216E418B7005B61E1 /* BTDiscoveryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDiscoveryViewController.h; sourceTree = "<group>"; };
966B9C9316E418B7005B61E1 /* BTDiscoveryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDiscoveryViewController.m; sourceTree = "<group>"; };
966B9C9516E418B7005B61E1 /* btstack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btstack.h; sourceTree = "<group>"; };
966B9C9616E418B7005B61E1 /* hci_cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hci_cmds.h; sourceTree = "<group>"; };
966B9C9716E418B7005B61E1 /* linked_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linked_list.h; sourceTree = "<group>"; };
966B9C9816E418B7005B61E1 /* run_loop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = run_loop.h; sourceTree = "<group>"; };
966B9C9916E418B7005B61E1 /* sdp_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sdp_util.h; sourceTree = "<group>"; };
966B9C9A16E418B7005B61E1 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
966B9C9B16E418B7005B61E1 /* BTstackManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTstackManager.h; sourceTree = "<group>"; };
966B9C9C16E418B7005B61E1 /* BTstackManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTstackManager.m; sourceTree = "<group>"; };
966B9C9D16E418B7005B61E1 /* libBTstack.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libBTstack.dylib; sourceTree = "<group>"; };
966B9C9E16E418B7005B61E1 /* wiimote.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wiimote.c; sourceTree = "<group>"; };
966B9C9F16E418B7005B61E1 /* wiimote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wiimote.h; sourceTree = "<group>"; };
966B9CA016E418B7005B61E1 /* WiiMoteHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WiiMoteHelper.h; sourceTree = "<group>"; };
966B9CA116E418B7005B61E1 /* WiiMoteHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WiiMoteHelper.m; sourceTree = "<group>"; };
969EBF6916D95746003787A2 /* PauseView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PauseView.xib; sourceTree = "<group>"; };
96AFAE2516C1D4EA009DE44C /* RetroArch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArch.app; sourceTree = BUILT_PRODUCTS_DIR; };
96AFAE2916C1D4EA009DE44C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@ -372,45 +378,13 @@
96AFAE2E16C1D4EA009DE44C /* CoreGraphics.framework in Frameworks */,
96AFAE3016C1D4EA009DE44C /* GLKit.framework in Frameworks */,
96AFAE3216C1D4EA009DE44C /* OpenGLES.framework in Frameworks */,
9614C6BD16DD7C00000B36EF /* libBTstack.dylib in Frameworks */,
966B9CA516E418B7005B61E1 /* libBTstack.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9614C6AC16DD7C00000B36EF /* BTStack */ = {
isa = PBXGroup;
children = (
9614C6B116DD7C00000B36EF /* btstack */,
9614C6AD16DD7C00000B36EF /* BTDevice.h */,
9614C6AE16DD7C00000B36EF /* BTDevice.m */,
960DB2C516E0197500F977E3 /* BTDiscoveryViewController.h */,
960DB2C616E0197600F977E3 /* BTDiscoveryViewController.m */,
960DB2C216E0193D00F977E3 /* BTstackManager.m */,
960DB2C316E0193D00F977E3 /* BTstackManager.h */,
9614C6B816DD7C00000B36EF /* libBTstack.dylib */,
9614C6B916DD7C00000B36EF /* WiiMoteHelper.h */,
9614C6BA16DD7C00000B36EF /* WiiMoteHelper.m */,
9614C6BF16DD7D54000B36EF /* wiimote.c */,
9614C6C016DD7D54000B36EF /* wiimote.h */,
);
path = BTStack;
sourceTree = "<group>";
};
9614C6B116DD7C00000B36EF /* btstack */ = {
isa = PBXGroup;
children = (
9614C6B216DD7C00000B36EF /* btstack.h */,
9614C6B316DD7C00000B36EF /* hci_cmds.h */,
9614C6B416DD7C00000B36EF /* linked_list.h */,
9614C6B516DD7C00000B36EF /* run_loop.h */,
9614C6B616DD7C00000B36EF /* sdp_util.h */,
9614C6B716DD7C00000B36EF /* utils.h */,
);
path = btstack;
sourceTree = "<group>";
};
96366C6F16CAF62200D64A22 /* settings */ = {
isa = PBXGroup;
children = (
@ -423,6 +397,50 @@
path = settings;
sourceTree = "<group>";
};
966B9C8516E40D44005B61E1 /* input */ = {
isa = PBXGroup;
children = (
966B9C8F16E418B7005B61E1 /* BTStack */,
966B9C8616E40D44005B61E1 /* ios_input.m */,
966B9C8716E40D44005B61E1 /* ios_joypad.m */,
966B9C8816E40D44005B61E1 /* RAInputResponder.h */,
966B9C8916E40D44005B61E1 /* RAInputResponder.m */,
);
path = input;
sourceTree = "<group>";
};
966B9C8F16E418B7005B61E1 /* BTStack */ = {
isa = PBXGroup;
children = (
966B9C9016E418B7005B61E1 /* BTDevice.h */,
966B9C9116E418B7005B61E1 /* BTDevice.m */,
966B9C9216E418B7005B61E1 /* BTDiscoveryViewController.h */,
966B9C9316E418B7005B61E1 /* BTDiscoveryViewController.m */,
966B9C9416E418B7005B61E1 /* btstack */,
966B9C9B16E418B7005B61E1 /* BTstackManager.h */,
966B9C9C16E418B7005B61E1 /* BTstackManager.m */,
966B9C9D16E418B7005B61E1 /* libBTstack.dylib */,
966B9C9E16E418B7005B61E1 /* wiimote.c */,
966B9C9F16E418B7005B61E1 /* wiimote.h */,
966B9CA016E418B7005B61E1 /* WiiMoteHelper.h */,
966B9CA116E418B7005B61E1 /* WiiMoteHelper.m */,
);
path = BTStack;
sourceTree = "<group>";
};
966B9C9416E418B7005B61E1 /* btstack */ = {
isa = PBXGroup;
children = (
966B9C9516E418B7005B61E1 /* btstack.h */,
966B9C9616E418B7005B61E1 /* hci_cmds.h */,
966B9C9716E418B7005B61E1 /* linked_list.h */,
966B9C9816E418B7005B61E1 /* run_loop.h */,
966B9C9916E418B7005B61E1 /* sdp_util.h */,
966B9C9A16E418B7005B61E1 /* utils.h */,
);
path = btstack;
sourceTree = "<group>";
};
96AFAE1A16C1D4EA009DE44C = {
isa = PBXGroup;
children = (
@ -466,7 +484,7 @@
96AFAE3316C1D4EA009DE44C /* RetroArch */ = {
isa = PBXGroup;
children = (
9614C6AC16DD7C00000B36EF /* BTStack */,
966B9C8516E40D44005B61E1 /* input */,
96C19C2716D455C600FE8D5A /* Browser */,
96366C6F16CAF62200D64A22 /* settings */,
96AFAE3416C1D4EA009DE44C /* Supporting Files */,
@ -478,7 +496,6 @@
96C19C2616D455BE00FE8D5A /* rarch_wrapper.h */,
96297A0A16C5AD8D00E6DCE0 /* RetroArch_iOS.h */,
96297A0B16C5AD8D00E6DCE0 /* RetroArch_iOS.m */,
965AE29D16D9BF94001D7667 /* ios_input.m */,
96297A0D16C5ADDA00E6DCE0 /* views.h */,
969EBF6916D95746003787A2 /* PauseView.xib */,
965AE29F16DA83C1001D7667 /* PauseIndicatorView.xib */,
@ -892,7 +909,8 @@
9614C6FD16DDC018000B36EF /* RADirectoryGrid.m in Sources */,
9614C6FE16DDC018000B36EF /* browser.m in Sources */,
9614C6FF16DDC018000B36EF /* RAConfig.m in Sources */,
9614C70016DDC018000B36EF /* ios_input.m in Sources */,
966B9C8D16E40EFC005B61E1 /* RAInputResponder.m in Sources */,
966B9C8E16E40F00005B61E1 /* ios_input.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -960,12 +978,14 @@
96C19C2416D453BA00FE8D5A /* RADirectoryGrid.m in Sources */,
96C19C2916D5A56500FE8D5A /* browser.m in Sources */,
96C19C3016D7045700FE8D5A /* RAConfig.m in Sources */,
965AE29E16D9BF94001D7667 /* ios_input.m in Sources */,
9614C6BB16DD7C00000B36EF /* BTDevice.m in Sources */,
9614C6BE16DD7C00000B36EF /* WiiMoteHelper.m in Sources */,
9614C6C116DD7D54000B36EF /* wiimote.c in Sources */,
960DB2C416E0193D00F977E3 /* BTstackManager.m in Sources */,
960DB2C716E0197600F977E3 /* BTDiscoveryViewController.m in Sources */,
966B9C8A16E40D44005B61E1 /* ios_input.m in Sources */,
966B9C8B16E40D44005B61E1 /* ios_joypad.m in Sources */,
966B9C8C16E40D44005B61E1 /* RAInputResponder.m in Sources */,
966B9CA216E418B7005B61E1 /* BTDevice.m in Sources */,
966B9CA316E418B7005B61E1 /* BTDiscoveryViewController.m in Sources */,
966B9CA416E418B7005B61E1 /* BTstackManager.m in Sources */,
966B9CA616E418B7005B61E1 /* wiimote.c in Sources */,
966B9CA716E418B7005B61E1 /* WiiMoteHelper.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1163,7 +1183,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/RetroArch/BTStack\"",
"\"$(SRCROOT)/RetroArch/input/BTStack\"",
);
OTHER_CFLAGS = (
"-DHAVE_RARCH_MAIN_WRAP",
@ -1201,7 +1221,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/RetroArch/BTStack\"",
"\"$(SRCROOT)/RetroArch/input/BTStack\"",
);
OTHER_CFLAGS = (
"-DNS_BLOCK_ASSERTIONS=1",

View File

@ -19,8 +19,7 @@
#import "browser.h"
#ifdef WIIMOTE
#include "BTStack/wiimote.h"
#import "BTStack/WiiMoteHelper.h"
#import "input/BTStack/WiiMoteHelper.h"
#endif

View File

@ -0,0 +1,32 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2013 - Jason Fetters
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
// Input responder
#define MAX_TOUCHES 16
#define MAX_KEYS 256
typedef struct touch_data
{
bool is_down;
int16_t screen_x, screen_y;
int16_t fixed_x, fixed_y;
int16_t full_x, full_y;
} touch_data_t;
@interface RAInputResponder : NSObject
- (void)poll;
- (bool)isKeyPressed:(unsigned)index;
- (const touch_data_t*)getTouchDataAtIndex:(unsigned)index;
@end

View File

@ -0,0 +1,94 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2013 - Jason Fetters
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#import "RAInputResponder.h"
#include "input/input_common.h"
extern NSString* const GSEventKeyDownNotification;
extern NSString* const GSEventKeyUpNotification;
extern NSString* const RATouchNotification;
@implementation RAInputResponder
{
unsigned _touchCount;
touch_data_t _touches[MAX_TOUCHES];
bool _keys[MAX_KEYS];
}
-(id)init
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyPressed:) name: GSEventKeyDownNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyReleased:) name: GSEventKeyUpNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleTouches:) name: RATouchNotification object:nil];
return self;
}
-(void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)poll
{
for (int i = 0; i != _touchCount; i ++)
{
input_translate_coord_viewport(_touches[i].screen_x, _touches[i].screen_y,
&_touches[i].fixed_x, &_touches[i].fixed_y,
&_touches[i].full_x, &_touches[i].full_y);
}
}
- (bool)isKeyPressed:(unsigned)index
{
return (index < MAX_KEYS) ? _keys[index] : NO;
}
- (const touch_data_t*)getTouchDataAtIndex:(unsigned)index
{
return (index < MAX_TOUCHES && _touches[index].is_down) ? &_touches[index] : 0;
}
// Response handlers
- (void)keyPressed:(NSNotification*)notification
{
int keycode = [[notification.userInfo objectForKey:@"keycode"] intValue];
if (keycode < MAX_KEYS) _keys[keycode] = true;
}
- (void)keyReleased:(NSNotification*)notification
{
int keycode = [[notification.userInfo objectForKey:@"keycode"] intValue];
if (keycode < MAX_KEYS) _keys[keycode] = false;
}
- (void)handleTouches:(NSNotification*)notification
{
UIEvent* event = [notification.userInfo objectForKey:@"event"];
NSArray* touches = [[event allTouches] allObjects];
_touchCount = [touches count];
for(int i = 0; i != _touchCount; i ++)
{
UITouch *touch = [touches objectAtIndex:i];
CGPoint coord = [touch locationInView:touch.view];
float scale = [[UIScreen mainScreen] scale];
_touches[i].is_down = (touch.phase != UITouchPhaseEnded) && (touch.phase != UITouchPhaseCancelled);
_touches[i].screen_x = coord.x * scale;
_touches[i].screen_y = coord.y * scale;
}
}
@end

View File

@ -0,0 +1,198 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2013 - Jason Fetters
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#import "RAInputResponder.h"
#include <unistd.h>
#include "input/input_common.h"
#include "general.h"
#include "driver.h"
#ifdef WIIMOTE
extern const rarch_joypad_driver_t ios_joypad;
static const rarch_joypad_driver_t* const g_joydriver = &ios_joypad;
#else
static const rarch_joypad_driver_t* const g_joydriver = 0;
#endif
static const struct rarch_key_map rarch_key_map_hidusage[];
static RAInputResponder* g_input_driver;
// Non-exported helpers
static bool ios_key_pressed(enum retro_key key)
{
if ((int)key >= 0 && key < RETROK_LAST)
{
return [g_input_driver isKeyPressed:input_translate_rk_to_keysym(key)];
}
return false;
}
static bool ios_is_pressed(unsigned port_num, const struct retro_keybind *key)
{
return ios_key_pressed(key->key) || input_joypad_pressed(g_joydriver, port_num, key);
}
// Exported input driver
static void *ios_input_init(void)
{
input_init_keyboard_lut(rarch_key_map_hidusage);
g_input_driver = [RAInputResponder new];
return (void*)-1;
}
static void ios_input_poll(void *data)
{
[g_input_driver poll];
input_joypad_poll(g_joydriver);
}
static int16_t ios_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)
{
switch (device)
{
case RETRO_DEVICE_JOYPAD:
return (id < RARCH_BIND_LIST_END) ? ios_is_pressed(port, &binds[port][id]) : false;
case RARCH_DEVICE_POINTER_SCREEN:
{
const touch_data_t* touch = [g_input_driver getTouchDataAtIndex:index];
switch (id)
{
case RETRO_DEVICE_ID_POINTER_X: return touch ? touch->full_x : 0;
case RETRO_DEVICE_ID_POINTER_Y: return touch ? touch->full_y : 0;
case RETRO_DEVICE_ID_POINTER_PRESSED: return touch ? 1 : 0;
}
return 0;
}
default:
return 0;
}
}
static bool ios_bind_button_pressed(void *data, int key)
{
const struct retro_keybind *binds = g_settings.input.binds[0];
return (key >= 0 && key < RARCH_BIND_LIST_END) ? ios_is_pressed(0, &binds[key]) : false;
}
static void ios_input_free_input(void *data)
{
(void)data;
g_input_driver = nil;
}
const input_driver_t input_ios = {
ios_input_init,
ios_input_poll,
ios_input_state,
ios_bind_button_pressed,
ios_input_free_input,
"ios_input",
};
// Key table
static const struct rarch_key_map rarch_key_map_hidusage[] = {
{ 0x50, RETROK_LEFT },
{ 0x4F, RETROK_RIGHT },
{ 0x52, RETROK_UP },
{ 0x51, RETROK_DOWN },
{ 0x28, RETROK_RETURN },
{ 0x2B, RETROK_TAB },
{ 0x49, RETROK_INSERT },
{ 0x4C, RETROK_DELETE },
{ 0xE5, RETROK_RSHIFT },
{ 0xE1, RETROK_LSHIFT },
{ 0xE0, RETROK_LCTRL },
{ 0x4D, RETROK_END },
{ 0x4A, RETROK_HOME },
{ 0x4E, RETROK_PAGEDOWN },
{ 0x4B, RETROK_PAGEUP },
{ 0xE2, RETROK_LALT },
{ 0x2C, RETROK_SPACE },
{ 0x29, RETROK_ESCAPE },
{ 0x2A, RETROK_BACKSPACE },
{ 0x58, RETROK_KP_ENTER },
{ 0x57, RETROK_KP_PLUS },
{ 0x56, RETROK_KP_MINUS },
{ 0x55, RETROK_KP_MULTIPLY },
{ 0x54, RETROK_KP_DIVIDE },
{ 0x35, RETROK_BACKQUOTE },
{ 0x48, RETROK_PAUSE },
{ 0x62, RETROK_KP0 },
{ 0x59, RETROK_KP1 },
{ 0x5A, RETROK_KP2 },
{ 0x5B, RETROK_KP3 },
{ 0x5C, RETROK_KP4 },
{ 0x5D, RETROK_KP5 },
{ 0x5E, RETROK_KP6 },
{ 0x5F, RETROK_KP7 },
{ 0x60, RETROK_KP8 },
{ 0x61, RETROK_KP9 },
{ 0x27, RETROK_0 },
{ 0x1E, RETROK_1 },
{ 0x1F, RETROK_2 },
{ 0x20, RETROK_3 },
{ 0x21, RETROK_4 },
{ 0x22, RETROK_5 },
{ 0x23, RETROK_6 },
{ 0x24, RETROK_7 },
{ 0x25, RETROK_8 },
{ 0x26, RETROK_9 },
{ 0x3A, RETROK_F1 },
{ 0x3B, RETROK_F2 },
{ 0x3C, RETROK_F3 },
{ 0x3D, RETROK_F4 },
{ 0x3E, RETROK_F5 },
{ 0x3F, RETROK_F6 },
{ 0x40, RETROK_F7 },
{ 0x41, RETROK_F8 },
{ 0x42, RETROK_F9 },
{ 0x43, RETROK_F10 },
{ 0x44, RETROK_F11 },
{ 0x45, RETROK_F12 },
{ 0x04, RETROK_a },
{ 0x05, RETROK_b },
{ 0x06, RETROK_c },
{ 0x07, RETROK_d },
{ 0x08, RETROK_e },
{ 0x09, RETROK_f },
{ 0x0A, RETROK_g },
{ 0x0B, RETROK_h },
{ 0x0C, RETROK_i },
{ 0x0D, RETROK_j },
{ 0x0E, RETROK_k },
{ 0x0F, RETROK_l },
{ 0x10, RETROK_m },
{ 0x11, RETROK_n },
{ 0x12, RETROK_o },
{ 0x13, RETROK_p },
{ 0x14, RETROK_q },
{ 0x15, RETROK_r },
{ 0x16, RETROK_s },
{ 0x17, RETROK_t },
{ 0x18, RETROK_u },
{ 0x19, RETROK_v },
{ 0x1A, RETROK_w },
{ 0x1B, RETROK_x },
{ 0x1C, RETROK_y },
{ 0x1D, RETROK_z },
{ 0, RETROK_UNKNOWN }
};

View File

@ -0,0 +1,68 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2013 - Jason Fetters
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "input/input_common.h"
#include "BTStack/wiimote.h"
#include "general.h"
static uint32_t g_buttons[MAX_PLAYERS];
static bool ios_joypad_init(void)
{
return true;
}
static bool ios_joypad_query_pad(unsigned pad)
{
return pad < MAX_PLAYERS;
}
static void ios_joypad_destroy(void)
{
}
static bool ios_joypad_button(unsigned port, uint16_t joykey)
{
if (joykey == NO_BTN)
return false;
// Check hat.
if (GET_HAT_DIR(joykey))
return false;
else // Check the button
return (port < MAX_PLAYERS && joykey < 32) ? (g_buttons[port] & (1 << joykey)) != 0 : false;
}
static int16_t ios_joypad_axis(unsigned port, uint32_t joyaxis)
{
return 0;
}
static void ios_joypad_poll(void)
{
for (int i = 0; i != MAX_PLAYERS; i ++)
g_buttons[i] = (i < myosd_num_of_joys) ? joys[i].btns : 0;
}
const rarch_joypad_driver_t ios_joypad = {
ios_joypad_init,
ios_joypad_query_pad,
ios_joypad_destroy,
ios_joypad_button,
ios_joypad_axis,
ios_joypad_poll,
"ios",
};

View File

@ -1,314 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2013 - Jason Fetters
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <unistd.h>
#include "../../input/input_common.h"
#include "../../performance.h"
#include "../../general.h"
#include "../../driver.h"
#ifdef WIIMOTE
#include "BTStack/wiimote.h"
#endif
#define MAX_TOUCH 16
#define MAX_KEYS 256
extern NSString* const GSEventKeyDownNotification;
extern NSString* const GSEventKeyUpNotification;
extern NSString* const RATouchNotification;
static const struct rarch_key_map rarch_key_map_hidusage[];
struct
{
bool is_down;
int16_t screen_x, screen_y;
int16_t fixed_x, fixed_y;
int16_t full_x, full_y;
} ios_touches[MAX_TOUCH];
uint32_t ios_current_touch_count = 0;
// Input responder
static bool ios_keys[MAX_KEYS];
@interface RAInputResponder : NSObject
@end
static RAInputResponder* input_driver;
@implementation RAInputResponder
-(id)init
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyPressed:) name: GSEventKeyDownNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyReleased:) name: GSEventKeyUpNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleTouches:) name: RATouchNotification object:nil];
return self;
}
-(void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
-(void)keyPressed: (NSNotification*)notification
{
int keycode = [[notification.userInfo objectForKey:@"keycode"] intValue];
if (keycode < MAX_KEYS) ios_keys[keycode] = true;
}
-(void)keyReleased: (NSNotification*)notification
{
int keycode = [[notification.userInfo objectForKey:@"keycode"] intValue];
if (keycode < MAX_KEYS) ios_keys[keycode] = false;
}
-(void)handleTouches:(NSNotification*)notification
{
UIEvent* event = [notification.userInfo objectForKey:@"event"];
NSArray* touches = [[event allTouches] allObjects];
ios_current_touch_count = [touches count];
for(int i = 0; i != ios_current_touch_count; i ++)
{
UITouch *touch = [touches objectAtIndex:i];
CGPoint coord = [touch locationInView:touch.view];
float scale = [[UIScreen mainScreen] scale];
ios_touches[i].is_down = (touch.phase != UITouchPhaseEnded) && (touch.phase != UITouchPhaseCancelled);
ios_touches[i].screen_x = coord.x * scale;
ios_touches[i].screen_y = coord.y * scale;
}
}
@end
static bool l_ios_is_key_pressed(enum retro_key key)
{
if ((int)key >= 0 && key < RETROK_LAST)
{
int hidkey = input_translate_rk_to_keysym(key);
return (hidkey < MAX_KEYS) ? ios_keys[hidkey] : false;
}
return false;
}
static int16_t l_ios_joypad_device_state(const struct retro_keybind **binds_,
unsigned port_num, unsigned id)
{
const struct retro_keybind *binds = binds_[port_num];
if (id < RARCH_BIND_LIST_END)
{
const struct retro_keybind *bind = &binds[id];
return bind->valid && l_ios_is_key_pressed(bind->key);
}
else
return 0;
}
static void *ios_input_init(void)
{
input_init_keyboard_lut(rarch_key_map_hidusage);
if (!input_driver)
input_driver = [RAInputResponder new];
ios_current_touch_count = 0;
memset(ios_touches, 0, sizeof(ios_touches));
memset(ios_keys, 0, sizeof(ios_keys));
return (void*)-1;
}
static void ios_input_free_input(void *data)
{
(void)data;
input_driver = nil;
}
static void ios_input_poll(void *data)
{
for (int i = 0; i != ios_current_touch_count; i ++)
{
input_translate_coord_viewport(ios_touches[i].screen_x, ios_touches[i].screen_y,
&ios_touches[i].fixed_x, &ios_touches[i].fixed_y,
&ios_touches[i].full_x, &ios_touches[i].full_y);
}
}
static int16_t ios_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)
{
switch (device)
{
case RETRO_DEVICE_JOYPAD:
#ifdef WIIMOTE
if (myosd_num_of_joys > 0)
{
struct wiimote_t* wm = &joys[0];
switch (id)
{
case RETRO_DEVICE_ID_JOYPAD_A: return IS_PRESSED(wm, WIIMOTE_BUTTON_TWO);
case RETRO_DEVICE_ID_JOYPAD_B: return IS_PRESSED(wm, WIIMOTE_BUTTON_ONE);
case RETRO_DEVICE_ID_JOYPAD_START: return IS_PRESSED(wm, WIIMOTE_BUTTON_PLUS);
case RETRO_DEVICE_ID_JOYPAD_SELECT: return IS_PRESSED(wm, WIIMOTE_BUTTON_MINUS);
case RETRO_DEVICE_ID_JOYPAD_UP: return IS_PRESSED(wm, WIIMOTE_BUTTON_RIGHT);
case RETRO_DEVICE_ID_JOYPAD_DOWN: return IS_PRESSED(wm, WIIMOTE_BUTTON_LEFT);
case RETRO_DEVICE_ID_JOYPAD_LEFT: return IS_PRESSED(wm, WIIMOTE_BUTTON_UP);
case RETRO_DEVICE_ID_JOYPAD_RIGHT: return IS_PRESSED(wm, WIIMOTE_BUTTON_DOWN);
}
}
#endif
return l_ios_joypad_device_state(binds, port, id);
case RETRO_DEVICE_ANALOG:
return 0;
case RETRO_DEVICE_MOUSE:
return 0;
case RETRO_DEVICE_POINTER:
return 0;
case RARCH_DEVICE_POINTER_SCREEN:
switch (id)
{
case RETRO_DEVICE_ID_POINTER_X:
return (index < ios_current_touch_count) ? ios_touches[index].full_x : 0;
case RETRO_DEVICE_ID_POINTER_Y:
return (index < ios_current_touch_count) ? ios_touches[index].full_y : 0;
case RETRO_DEVICE_ID_POINTER_PRESSED:
return (index < ios_current_touch_count) ? ios_touches[index].is_down : 0;
default:
return 0;
}
case RETRO_DEVICE_KEYBOARD:
return 0;
case RETRO_DEVICE_LIGHTGUN:
return 0;
default:
return 0;
}
}
static bool ios_input_key_pressed(void *data, int key)
{
const struct retro_keybind *binds = g_settings.input.binds[0];
if (key >= 0 && key < RARCH_BIND_LIST_END)
{
const struct retro_keybind *bind = &binds[key];
return l_ios_is_key_pressed(bind->key);
}
return false;
}
const input_driver_t input_ios = {
ios_input_init,
ios_input_poll,
ios_input_state,
ios_input_key_pressed,
ios_input_free_input,
"ios_input",
};
// Key table
static const struct rarch_key_map rarch_key_map_hidusage[] = {
{ 0x50, RETROK_LEFT },
{ 0x4F, RETROK_RIGHT },
{ 0x52, RETROK_UP },
{ 0x51, RETROK_DOWN },
{ 0x28, RETROK_RETURN },
{ 0x2B, RETROK_TAB },
{ 0x49, RETROK_INSERT },
{ 0x4C, RETROK_DELETE },
{ 0xE5, RETROK_RSHIFT },
{ 0xE1, RETROK_LSHIFT },
{ 0xE0, RETROK_LCTRL },
{ 0x4D, RETROK_END },
{ 0x4A, RETROK_HOME },
{ 0x4E, RETROK_PAGEDOWN },
{ 0x4B, RETROK_PAGEUP },
{ 0xE2, RETROK_LALT },
{ 0x2C, RETROK_SPACE },
{ 0x29, RETROK_ESCAPE },
{ 0x2A, RETROK_BACKSPACE },
{ 0x58, RETROK_KP_ENTER },
{ 0x57, RETROK_KP_PLUS },
{ 0x56, RETROK_KP_MINUS },
{ 0x55, RETROK_KP_MULTIPLY },
{ 0x54, RETROK_KP_DIVIDE },
{ 0x35, RETROK_BACKQUOTE },
{ 0x48, RETROK_PAUSE },
{ 0x62, RETROK_KP0 },
{ 0x59, RETROK_KP1 },
{ 0x5A, RETROK_KP2 },
{ 0x5B, RETROK_KP3 },
{ 0x5C, RETROK_KP4 },
{ 0x5D, RETROK_KP5 },
{ 0x5E, RETROK_KP6 },
{ 0x5F, RETROK_KP7 },
{ 0x60, RETROK_KP8 },
{ 0x61, RETROK_KP9 },
{ 0x27, RETROK_0 },
{ 0x1E, RETROK_1 },
{ 0x1F, RETROK_2 },
{ 0x20, RETROK_3 },
{ 0x21, RETROK_4 },
{ 0x22, RETROK_5 },
{ 0x23, RETROK_6 },
{ 0x24, RETROK_7 },
{ 0x25, RETROK_8 },
{ 0x26, RETROK_9 },
{ 0x3A, RETROK_F1 },
{ 0x3B, RETROK_F2 },
{ 0x3C, RETROK_F3 },
{ 0x3D, RETROK_F4 },
{ 0x3E, RETROK_F5 },
{ 0x3F, RETROK_F6 },
{ 0x40, RETROK_F7 },
{ 0x41, RETROK_F8 },
{ 0x42, RETROK_F9 },
{ 0x43, RETROK_F10 },
{ 0x44, RETROK_F11 },
{ 0x45, RETROK_F12 },
{ 0x04, RETROK_a },
{ 0x05, RETROK_b },
{ 0x06, RETROK_c },
{ 0x07, RETROK_d },
{ 0x08, RETROK_e },
{ 0x09, RETROK_f },
{ 0x0A, RETROK_g },
{ 0x0B, RETROK_h },
{ 0x0C, RETROK_i },
{ 0x0D, RETROK_j },
{ 0x0E, RETROK_k },
{ 0x0F, RETROK_l },
{ 0x10, RETROK_m },
{ 0x11, RETROK_n },
{ 0x12, RETROK_o },
{ 0x13, RETROK_p },
{ 0x14, RETROK_q },
{ 0x15, RETROK_r },
{ 0x16, RETROK_s },
{ 0x17, RETROK_t },
{ 0x18, RETROK_u },
{ 0x19, RETROK_v },
{ 0x1A, RETROK_w },
{ 0x1B, RETROK_x },
{ 0x1C, RETROK_y },
{ 0x1D, RETROK_z },
{ 0, RETROK_UNKNOWN }
};

View File

@ -16,7 +16,7 @@
#import "settings.h"
#ifdef WIIMOTE
# include "../BTStack/wiimote.h"
# include "../input/BTStack/wiimote.h"
#endif
extern NSString* const GSEventKeyUpNotification;