From 62aa5b73be6ec1e499e6b155cd0e7687c338cbaa Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Fri, 1 Mar 2013 03:03:51 +0100 Subject: [PATCH] Rename from Enjoy/Enjoy2 to 'Enjoyable'. While I'm mucking in the project file, enable a bunch of warnings and fixes for those warnings. --- ApplicationController.m | 10 +- ConfigsController.h | 2 +- ConfigsController.m | 16 +- English.lproj/MainMenu.xib | 291 ++---------------- .../TemplateIcon.icns | Bin .../project.pbxproj | 70 +++-- Enjoy_Prefix.pch => Enjoyable_Prefix.pch | 0 Info.plist | 8 +- JSAction.h | 2 +- JSActionAnalog.h | 2 +- JSActionAnalog.m | 8 +- JSActionButton.h | 2 +- JSActionButton.m | 4 +- JSActionHat.m | 6 +- Joystick.m | 12 +- JoystickController.h | 2 +- JoystickController.m | 4 +- NJEvents.h | 14 + README.md | 91 ++++-- TargetController.m | 2 +- TargetMouseBtn.m | 4 +- TargetMouseMove.m | 6 +- 22 files changed, 203 insertions(+), 353 deletions(-) rename {Enjoy.xcodeproj => Enjoyable.xcodeproj}/TemplateIcon.icns (100%) rename {Enjoy.xcodeproj => Enjoyable.xcodeproj}/project.pbxproj (90%) rename Enjoy_Prefix.pch => Enjoyable_Prefix.pch (100%) create mode 100644 NJEvents.h diff --git a/ApplicationController.m b/ApplicationController.m index dd38323..a3ad5ed 100644 --- a/ApplicationController.m +++ b/ApplicationController.m @@ -49,8 +49,8 @@ activeMenuItem.state = sendRealEvents; } -- (NSUInteger)firstConfigMenuIndex { - NSUInteger count = dockMenuBase.numberOfItems; +- (NSInteger)firstConfigMenuIndex { + NSInteger count = dockMenuBase.numberOfItems; for (int i = 0; i < count; ++i) if ([dockMenuBase itemAtIndex:i].isSeparatorItem) return i + 1; @@ -58,7 +58,7 @@ } - (void)configsChanged { - NSUInteger removeFrom = [self firstConfigMenuIndex]; + NSInteger removeFrom = [self firstConfigMenuIndex]; while (dockMenuBase.numberOfItems > removeFrom) [dockMenuBase removeItemAtIndex:dockMenuBase.numberOfItems - 1]; for (Config *config in self.configsController.configs) @@ -68,7 +68,7 @@ } - (void)configChanged { - NSUInteger firstConfig = [self firstConfigMenuIndex]; + NSInteger firstConfig = [self firstConfigMenuIndex]; Config *current = self.configsController.currentConfig; NSArray *configs = self.configsController.configs; for (int i = 0; i < configs.count; ++i) @@ -76,7 +76,7 @@ } - (void)chooseConfig:(id)sender { - int idx = [dockMenuBase indexOfItem:sender] - [self firstConfigMenuIndex]; + NSInteger idx = [dockMenuBase indexOfItem:sender] - [self firstConfigMenuIndex]; Config *chosen = self.configsController.configs[idx]; [_configsController activateConfig:chosen]; } diff --git a/ConfigsController.h b/ConfigsController.h index e616e1e..9d6d9a1 100644 --- a/ConfigsController.h +++ b/ConfigsController.h @@ -9,7 +9,7 @@ @class Config; @class TargetController; -@interface ConfigsController : NSObject { +@interface ConfigsController : NSObject { IBOutlet NSButton *removeButton; IBOutlet NSTableView *tableView; IBOutlet TargetController *targetController; diff --git a/ConfigsController.m b/ConfigsController.m index b4db790..8870fab 100644 --- a/ConfigsController.m +++ b/ConfigsController.m @@ -60,7 +60,7 @@ [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged]; [tableView reloadData]; [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:_configs.count - 1] byExtendingSelection:NO]; - [tableView editColumn:0 row:[_configs count] - 1 withEvent:nil select:YES]; + [tableView editColumn:0 row:_configs.count - 1 withEvent:nil select:YES]; } - (IBAction)removePressed:(id)sender { @@ -84,21 +84,21 @@ [self activateConfig:_configs[tableView.selectedRow]]; } -- (id)tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)column row:(int)index { +- (id)tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger)index { return [_configs[index] name]; } -- (void)tableView:(NSTableView *)view setObjectValue:(NSString *)obj forTableColumn:(NSTableColumn *)col row:(int)index { +- (void)tableView:(NSTableView *)view setObjectValue:(NSString *)obj forTableColumn:(NSTableColumn *)col row:(NSInteger)index { [(Config *)_configs[index] setName:obj]; [tableView reloadData]; [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged]; } -- (int)numberOfRowsInTableView:(NSTableView*)table { - return [_configs count]; +- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { + return _configs.count; } -- (BOOL)tableView:(NSTableView *)view shouldEditTableColumn:(NSTableColumn *)column row:(int)index { +- (BOOL)tableView:(NSTableView *)view shouldEditTableColumn:(NSTableColumn *)column row:(NSInteger)index { return index > 0; } @@ -136,7 +136,7 @@ [newConfigs addObject:cfg]; } - for (int i = 0; i < storedConfigs.count; ++i) { + for (unsigned i = 0; i < storedConfigs.count; ++i) { NSDictionary *entries = storedConfigs[i][@"entries"]; Config *config = newConfigs[i]; for (id key in entries) @@ -145,7 +145,7 @@ } if (newConfigs.count) { - int current = [envelope[@"selectedConfiguration"] unsignedIntValue]; + unsigned current = [envelope[@"selectedConfiguration"] unsignedIntValue]; if (current >= newConfigs.count) current = 0; _configs = newConfigs; diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index d9cfe8e..1b4989d 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -62,7 +62,7 @@ - Enjoy + Enjoyable 1048576 2147483647 @@ -76,11 +76,11 @@ submenuAction: - Enjoy + Enjoyable - About Enjoy + About Enjoyable 2147483647 @@ -125,7 +125,7 @@ - Hide Enjoy + Hide Enjoyable h 1048576 2147483647 @@ -163,7 +163,7 @@ - Quit Enjoy + Quit Enjoyable q 1048576 2147483647 @@ -272,7 +272,7 @@ 2 {{355, 59}, {640, 300}} 1685585920 - Enjoy + Enjoyable NSWindow @@ -429,7 +429,7 @@ {640, 300} - + 256 @@ -453,7 +453,6 @@ 256 {200, 298} - YES NO @@ -551,7 +550,6 @@ {{1, 1}, {200, 298}} - @@ -562,7 +560,6 @@ -2147483392 {{1, 1}, {8, 298}} - NO @@ -574,7 +571,6 @@ -2147483392 {{-100, -100}, {473, 15}} - NO 1 @@ -585,7 +581,6 @@ {202, 300} - 133650 @@ -599,7 +594,6 @@ {202, 300} - NSView @@ -612,7 +606,6 @@ 268 {{227, 123}, {180, 24}} - _NS:9 YES @@ -649,7 +642,6 @@ 268 {{227, 55}, {180, 24}} - _NS:9 YES @@ -681,7 +673,6 @@ 268 {{227, 89}, {180, 24}} - _NS:9 YES @@ -714,7 +705,6 @@ 268 {{20, 16}, {201, 236}} - NO 7 1 @@ -728,6 +718,10 @@ 1 1211912448 0 + + NSImage + NSRadioButton + NSRadioButton @@ -744,101 +738,9 @@ 1211912448 0 - - 549453824 - {18, 18} - - - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4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AdGV4dAAAAABDb3B5cmlnaHQg -QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA - - - - - - 3 - MCAwAA - - + + 400 75 @@ -850,114 +752,9 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA 1211912448 0 - - 549453824 - {18, 18} - - - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2d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AAAv9OKeAAAAAAAAAAAAAAAAAAAAAB0ZXh0AAAAAENvcHlyaWdodCBBcHBs -ZSwgSW5jLiwgMjAwOQA - - - - - - + + 400 75 @@ -969,7 +766,9 @@ ZSwgSW5jLiwgMjAwOQA 1211912448 0 + + 400 75 @@ -981,7 +780,9 @@ ZSwgSW5jLiwgMjAwOQA 1211912448 0 + + 400 75 @@ -993,7 +794,9 @@ ZSwgSW5jLiwgMjAwOQA 1211912448 0 + + 400 75 @@ -1005,7 +808,9 @@ ZSwgSW5jLiwgMjAwOQA 1211912448 0 + + 400 75 @@ -1021,46 +826,9 @@ ZSwgSW5jLiwgMjAwOQA 1211912448 0 - - 549453824 - {18, 18} - - - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7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AFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - - - - - - + + 400 75 @@ -1080,7 +848,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{226, 156}, {182, 26}} - YES @@ -1113,7 +880,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 266 {{0, 269}, {429, 17}} - YES @@ -1137,7 +903,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 12 {{0, 258}, {465, 5}} - {0, 0} @@ -1166,28 +931,23 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 265 {{229, 190}, {176, 24}} - _NS:9 KeyInputTextView {{211, 0}, {429, 300}} - NSView {640, 300} - YES {640, 300} - - {{0, 0}, {1440, 878}} @@ -2749,6 +2509,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {11, 11} {10, 3} {32, 32} + {16, 15} {8, 8} diff --git a/Enjoy.xcodeproj/TemplateIcon.icns b/Enjoyable.xcodeproj/TemplateIcon.icns similarity index 100% rename from Enjoy.xcodeproj/TemplateIcon.icns rename to Enjoyable.xcodeproj/TemplateIcon.icns diff --git a/Enjoy.xcodeproj/project.pbxproj b/Enjoyable.xcodeproj/project.pbxproj similarity index 90% rename from Enjoy.xcodeproj/project.pbxproj rename to Enjoyable.xcodeproj/project.pbxproj index 642e5e2..aac5494 100644 --- a/Enjoy.xcodeproj/project.pbxproj +++ b/Enjoyable.xcodeproj/project.pbxproj @@ -43,7 +43,7 @@ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* Enjoy_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Enjoy_Prefix.pch; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* Enjoyable_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Enjoyable_Prefix.pch; sourceTree = ""; }; 8B7E476A15C314A200C588FA /* TargetMouseBtn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetMouseBtn.h; sourceTree = ""; }; 8B7E476B15C314A200C588FA /* TargetMouseBtn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetMouseBtn.m; sourceTree = ""; }; 8BD9B54115C230FE00929C5D /* TargetMouseMove.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetMouseMove.h; sourceTree = ""; }; @@ -53,7 +53,7 @@ 8BEFAD9E15C476DC00823AEC /* TargetToggleMouseScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetToggleMouseScope.h; sourceTree = ""; }; 8BEFAD9F15C476DC00823AEC /* TargetToggleMouseScope.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetToggleMouseScope.m; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* Enjoy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Enjoy.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D1107320486CEB800E47090 /* Enjoyable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Enjoyable.app; sourceTree = BUILT_PRODUCTS_DIR; }; D549CA4B0FBB441B00BC8203 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = ""; }; D5617A080FAEAF8300928B3A /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = ""; }; D5617A340FAEB74000928B3A /* ConfigsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfigsController.h; sourceTree = ""; }; @@ -169,7 +169,7 @@ 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 8D1107320486CEB800E47090 /* Enjoy.app */, + 8D1107320486CEB800E47090 /* Enjoyable.app */, ); name = Products; sourceTree = ""; @@ -189,7 +189,7 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - 32CA4F630368D1EE00C91783 /* Enjoy_Prefix.pch */, + 32CA4F630368D1EE00C91783 /* Enjoyable_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, EE1D7C9016E01E7000B000EB /* NSView+FirstResponder.h */, EE1D7C9116E01E7000B000EB /* NSView+FirstResponder.m */, @@ -221,9 +221,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* Enjoy */ = { + 8D1107260486CEB800E47090 /* Enjoyable */ = { isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoy" */; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoyable" */; buildPhases = ( 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, @@ -233,10 +233,10 @@ ); dependencies = ( ); - name = Enjoy; + name = Enjoyable; productInstallPath = "$(HOME)/Applications"; productName = Enjoy; - productReference = 8D1107320486CEB800E47090 /* Enjoy.app */; + productReference = 8D1107320486CEB800E47090 /* Enjoyable.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -247,7 +247,7 @@ attributes = { LastUpgradeCheck = 0460; }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoy" */; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoyable" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; @@ -261,7 +261,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 8D1107260486CEB800E47090 /* Enjoy */, + 8D1107260486CEB800E47090 /* Enjoyable */, ); }; /* End PBXProject section */ @@ -334,7 +334,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -346,11 +346,11 @@ GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Enjoy_Prefix.pch; + GCC_PREFIX_HEADER = Enjoyable_Prefix.pch; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.7; - PRODUCT_NAME = Enjoy; + PRODUCT_NAME = Enjoyable; }; name = Debug; }; @@ -358,7 +358,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -368,11 +368,11 @@ ); GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Enjoy_Prefix.pch; + GCC_PREFIX_HEADER = Enjoyable_Prefix.pch; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.7; - PRODUCT_NAME = Enjoy; + PRODUCT_NAME = Enjoyable; }; name = Release; }; @@ -380,11 +380,26 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -394,10 +409,25 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.7; SDKROOT = macosx; }; name = Release; @@ -405,7 +435,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoy" */ = { + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoyable" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4B08A954540054247B /* Debug */, @@ -414,7 +444,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoy" */ = { + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoyable" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, diff --git a/Enjoy_Prefix.pch b/Enjoyable_Prefix.pch similarity index 100% rename from Enjoy_Prefix.pch rename to Enjoyable_Prefix.pch diff --git a/Info.plist b/Info.plist index e7d0890..167e1f4 100644 --- a/Info.plist +++ b/Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile icon.icns CFBundleIdentifier - net.tunah.${PRODUCT_NAME:identifier} + com.korewanetadesu.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,11 +17,13 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2 + 0.5 CFBundleSignature ???? CFBundleVersion - 2 + 3 + LSApplicationCategoryType + public.app-category.utilities NSHumanReadableCopyright Copyright (c) 2009 Sam McCall NSMainNibFile diff --git a/JSAction.h b/JSAction.h index 5f61191..551eb0f 100644 --- a/JSAction.h +++ b/JSAction.h @@ -8,7 +8,7 @@ @interface JSAction : NSObject -@property (assign) void *cookie; +@property (assign) IOHIDElementCookie cookie; @property (copy) NSArray *children; @property (weak) id base; @property (copy) NSString *name; diff --git a/JSActionAnalog.h b/JSActionAnalog.h index c2660c0..deaf3a5 100644 --- a/JSActionAnalog.h +++ b/JSActionAnalog.h @@ -12,6 +12,6 @@ @interface JSActionAnalog : JSAction -- (id)initWithIndex:(int)index rawMin:(int)rawMin rawMax:(int)rawMax; +- (id)initWithIndex:(int)index rawMin:(long)rawMin rawMax:(long)rawMax; @end diff --git a/JSActionAnalog.m b/JSActionAnalog.m index 3083886..9c98f21 100644 --- a/JSActionAnalog.m +++ b/JSActionAnalog.m @@ -9,17 +9,17 @@ #import "JSActionAnalog.h" -static float normalize(int p, int min, int max) { +static float normalize(long p, long min, long max) { return 2 * (p - min) / (float)(max - min) - 1; } @implementation JSActionAnalog { float magnitude; - int rawMin; - int rawMax; + long rawMin; + long rawMax; } -- (id)initWithIndex:(int)index rawMin:(int)rawMin_ rawMax:(int)rawMax_ { +- (id)initWithIndex:(int)index rawMin:(long)rawMin_ rawMax:(long)rawMax_ { if ((self = [super init])) { self.name = [[NSString alloc] initWithFormat: @"Axis %d", index]; self.children = @[[[JSAction alloc] initWithName:@"Low" base:self], diff --git a/JSActionButton.h b/JSActionButton.h index 927606d..8a4bdc6 100644 --- a/JSActionButton.h +++ b/JSActionButton.h @@ -10,6 +10,6 @@ @interface JSActionButton : JSAction -- (id)initWithName:(NSString *)name idx:(int)idx max:(int)max; +- (id)initWithName:(NSString *)name idx:(int)idx max:(long)max; @end diff --git a/JSActionButton.m b/JSActionButton.m index c74c0e2..7d2572a 100644 --- a/JSActionButton.m +++ b/JSActionButton.m @@ -8,10 +8,10 @@ #import "JSActionButton.h" @implementation JSActionButton { - int _max; + long _max; } -- (id)initWithName:(NSString *)name idx:(int)idx max:(int)max { +- (id)initWithName:(NSString *)name idx:(int)idx max:(long)max { if ((self = [super init])) { _max = max; if (name.length) diff --git a/JSActionHat.m b/JSActionHat.m index 174d2df..2cac39c 100644 --- a/JSActionHat.m +++ b/JSActionHat.m @@ -41,7 +41,7 @@ static BOOL active_fourway[20] = { } - (id)findSubActionForValue:(IOHIDValueRef)value { - int parsed = IOHIDValueGetIntegerValue(value); + long parsed = IOHIDValueGetIntegerValue(value); switch (IOHIDElementGetLogicalMax(IOHIDValueGetElement(value))) { case 7: // 8-way switch, 0-7. switch (parsed) { @@ -81,8 +81,8 @@ static BOOL active_fourway[20] = { } - (void)notifyEvent:(IOHIDValueRef)value { - int parsed = IOHIDValueGetIntegerValue(value); - int size = IOHIDElementGetLogicalMax(IOHIDValueGetElement(value)); + long parsed = IOHIDValueGetIntegerValue(value); + long size = IOHIDElementGetLogicalMax(IOHIDValueGetElement(value)); // Skip first row in table if 0 is not neutral. if (size & 1) { parsed++; diff --git a/Joystick.m b/Joystick.m index 35b40c5..3b43e4e 100644 --- a/Joystick.m +++ b/Joystick.m @@ -23,10 +23,10 @@ static NSArray *ActionsForElement(IOHIDDeviceRef device, id base) { for (int i = 0; i < CFArrayGetCount(elements); i++) { IOHIDElementRef element = (IOHIDElementRef)CFArrayGetValueAtIndex(elements, i); int type = IOHIDElementGetType(element); - int usage = IOHIDElementGetUsage(element); - int usagePage = IOHIDElementGetUsagePage(element); - int max = IOHIDElementGetPhysicalMax(element); - int min = IOHIDElementGetPhysicalMin(element); + unsigned usage = IOHIDElementGetUsage(element); + unsigned usagePage = IOHIDElementGetUsagePage(element); + long max = IOHIDElementGetPhysicalMax(element); + long min = IOHIDElementGetPhysicalMin(element); CFStringRef elName = IOHIDElementGetName(element); JSAction *action = nil; @@ -88,7 +88,7 @@ static NSArray *ActionsForElement(IOHIDDeviceRef device, id base) { return [NSString stringWithFormat: @"%d:%d:%d", vendorId, productId, _index]; } -- (JSAction *)findActionByCookie:(void *)cookie { +- (JSAction *)findActionByCookie:(IOHIDElementCookie)cookie { for (JSAction *child in _children) if (child.cookie == cookie) return child; @@ -102,7 +102,7 @@ static NSArray *ActionsForElement(IOHIDDeviceRef device, id base) { - (JSAction *)actionForEvent:(IOHIDValueRef)value { IOHIDElementRef elt = IOHIDValueGetElement(value); - void *cookie = IOHIDElementGetCookie(elt); + IOHIDElementCookie cookie = IOHIDElementGetCookie(elt); return [self findActionByCookie:cookie]; } diff --git a/JoystickController.h b/JoystickController.h index 4da83cd..7282093 100644 --- a/JoystickController.h +++ b/JoystickController.h @@ -11,7 +11,7 @@ @class ConfigsController; @class TargetController; -@interface JoystickController : NSObject { +@interface JoystickController : NSObject { IBOutlet NSOutlineView *outlineView; IBOutlet TargetController *targetController; IBOutlet ConfigsController *configsController; diff --git a/JoystickController.m b/JoystickController.m index cd513de..33201f5 100644 --- a/JoystickController.m +++ b/JoystickController.m @@ -189,7 +189,7 @@ static void remove_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDD return [item children] ? nil : item; } -- (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { +- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { return item ? [[item children] count] : _joysticks.count; } @@ -197,7 +197,7 @@ static void remove_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDD return item ? [[item children] count] > 0: YES; } -- (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item { +- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item { return item ? [item children][index] : _joysticks[index]; } diff --git a/NJEvents.h b/NJEvents.h new file mode 100644 index 0000000..1d718d9 --- /dev/null +++ b/NJEvents.h @@ -0,0 +1,14 @@ +// +// NJEvents.h +// Enjoy +// +// Created by Joe Wreschnig on 3/1/13. +// +// + +#ifndef Enjoy_NJEvents_h +#define Enjoy_NJEvents_h + + + +#endif diff --git a/README.md b/README.md index 2a7c478..a188dd8 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,83 @@ -Enjoy2 -====== +Enjoyable +========= -Enjoy2 is a simple program for Mac OSX that allows you to transform joystick inputs into keyboard or mouse events. +Enjoyable is a simple program for Mac OS X which allows you to use +joystick inputs like a mouse or keyboard. If you've ever played a +video game which only supports mouse and keyboard input but you want +to use a joystick or gamepad, then Enjoyable is the program for you. -If you've ever played a video game which only supports mouse and keyboard input, but you want to use a joystick or gamepad, then Enjoy2 is the program for you. Enjoy2 lets you map your joystick inputs to: +Enjoyable supports multiple configurations (for different games or +programs) and you can even map joystick buttons to change +configurations on-the-fly. -* Key events -* Mouse clicks -* Mouse movement (for analog sticks) -* Scrolling +Enjoyable is free software written by Joe Wreschnig and is based on +the Enjoy codebase written by [Yifeng Huang](htty://nongraphical.com) +and [Sam McCall](http://abstractable.net/enjoy/). -Enjoy2 supports multiple configurations (for different games or programs) and you can even map joystick buttons to change configurations on-the-fly. +## How to Use -Enjoy2 is written by [Yifeng Huang](htty://nongraphical.com) and is based on [Enjoy by Sam McCall](http://abstractable.net/enjoy/). Enjoy is MIT-licensed. +At startup, and when Enjoyable is paused, press any button or move any +analog stick to jump to the configuration for that button or stick. +From there, select one of the mapping options from the choices on the +right. -## How to use +To quickly map a joystick to keyboard actions, you can simply press +the joystick button or axis, then the keyboard key you wish to map +it to, and repeat. -At startup, and when Enjoy2 is paused, press any button or move any analog stick to jump to the configuration for that button or stick. From there, select one of the mapping options from the choices on the right. +Once you've done that, click the Start button and begin using your +joystick as a keyboard and mouse. -To use an analog axis to move the mouse, select the "Analog" sub-item on the left. +If you name a configuration after the title of a program (e.g. what +appears when you hover over it in the dock) that configuration will +automatically be selected when you switch to that program. -### Mapping modes +### Mouse Mapping Compatibility -Enjoy2 offers two mouse mapping modes: global and single-window. Enjoy2 starts in global mode, but you can set any joystick button to the "toggle mouse scope" action, which will change the mode. If you are using Enjoy2 to play a video game, you may find that one or the other mode offers better compatibility with your game's specific requirements. +Enjoyable offers two mouse mapping modes: global and single-window. +Enjoyable starts in global mode, but you can set any joystick button to +the "toggle mouse scope" action, which will change the mode. If you +are using Enjoy2 to play a video game, you may find that one or the +other mode offers better compatibility with your game's specific +requirements. ## Requirements -* Mac OS X 10.6 (Snow Leopard) or higher -* USB gamepad/joystick/controller +* Mac OS X 10.7+ +* HID-compatible (e.g. USB or Bluetooth) input device -## Changelog +## Changes -Version 1.1 +Version 1 -* Forked from Enjoy -* Mouse movement support -* Mouse button support -* Scrollwheel support -* Support for two mouse movement modes +* Forked from Enjoy/Enjoy2. The code has been modernized and optimized. + Many bugs and UI issues were fixed. + +## License + +Enjoyable is based on Enjoy and Enjoy2, by Sam McCall and Yifeng Huang. + +Copyright 2013 Joe Wreschnig + 2012 Yifeng Huang + 2009 Sam McCall, University of Otago + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +The joystick icon is from the Tango icon set and is public domain. diff --git a/TargetController.m b/TargetController.m index a7dbd2c..9aad491 100644 --- a/TargetController.m +++ b/TargetController.m @@ -211,7 +211,7 @@ - (void)refreshConfigs { // TODO: This doesn't work when removing configs. - int initialIndex = configPopup.indexOfSelectedItem; + NSInteger initialIndex = configPopup.indexOfSelectedItem; [configPopup removeAllItems]; for (Config *config in configsController.configs) [configPopup addItemWithTitle:config.name]; diff --git a/TargetMouseBtn.m b/TargetMouseBtn.m index 3efb88a..46234ec 100644 --- a/TargetMouseBtn.m +++ b/TargetMouseBtn.m @@ -27,7 +27,7 @@ -(void) trigger { NSRect screenRect = [[NSScreen mainScreen] frame]; - NSInteger height = screenRect.size.height; + CGFloat height = screenRect.size.height; NSPoint mouseLoc = [NSEvent mouseLocation]; CGEventType eventType = (_button == kCGMouseButtonLeft) ? kCGEventLeftMouseDown : kCGEventRightMouseDown; CGEventRef click = CGEventCreateMouseEvent(NULL, @@ -40,7 +40,7 @@ -(void) untrigger { NSRect screenRect = [[NSScreen mainScreen] frame]; - NSInteger height = screenRect.size.height; + CGFloat height = screenRect.size.height; NSPoint mouseLoc = [NSEvent mouseLocation]; CGEventType eventType = (_button == kCGMouseButtonLeft) ? kCGEventLeftMouseUp : kCGEventRightMouseUp; CGEventRef click = CGEventCreateMouseEvent(NULL, diff --git a/TargetMouseMove.m b/TargetMouseMove.m index 8bbfd42..52f241a 100644 --- a/TargetMouseMove.m +++ b/TargetMouseMove.m @@ -48,7 +48,7 @@ } NSRect screenRect = [[NSScreen mainScreen] frame]; - NSInteger height = screenRect.size.height; + CGFloat height = screenRect.size.height; // TODO float speed = 4.f; @@ -68,8 +68,8 @@ CGPointMake(mouseLoc.x, height - mouseLoc.y), 0); CGEventSetType(move, kCGEventMouseMoved); - CGEventSetIntegerValueField(move, kCGMouseEventDeltaX, dx); - CGEventSetIntegerValueField(move, kCGMouseEventDeltaY, dy); + CGEventSetIntegerValueField(move, kCGMouseEventDeltaX, (int)dx); + CGEventSetIntegerValueField(move, kCGMouseEventDeltaY, (int)dy); if ([jc frontWindowOnly]) { ProcessSerialNumber psn; -- 2.30.2