Skip to content

Commit

Permalink
Fix issue with micro gamepads that could sometimes cause an exception…
Browse files Browse the repository at this point in the history
… to be thrown when using tvOS controllers
  • Loading branch information
coolblueflame committed May 25, 2023
1 parent da15ae6 commit ca63daf
Show file tree
Hide file tree
Showing 14 changed files with 460 additions and 20 deletions.
4 changes: 2 additions & 2 deletions GameControllerWrapper/Source/GameControllerWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ BOOL NCRegisterInputCallback(void (*unity_callback)(int, float, float)) {
elemId = Dpad;
}

if (elemId <= ButtonThumbstickRight) {
if ([element isKindOfClass:[GCControllerButtonInput class]]) {
val1 = ((GCControllerButtonInput*)element).value;
val2 = ((GCControllerButtonInput*)element).pressed;
} else if (elemId <= ThumbstickRight) {
} else if ([element isKindOfClass:[GCControllerDirectionPad class]]) {
val1 = ((GCControllerDirectionPad*)element).xAxis.value;
val2 = ((GCControllerDirectionPad*)element).yAxis.value;
}
Expand Down
Binary file modified NCGameControllerUnity.unitypackage
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20C69</string>
<string>22A400</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,19 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12C33</string>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>11.1</string>
<string>13.3</string>
<key>DTSDKBuild</key>
<string>20C63</string>
<string>22E245</string>
<key>DTSDKName</key>
<string>macosx11.1</string>
<string>macosx13.3</string>
<key>DTXcode</key>
<string>1230</string>
<string>1430</string>
<key>DTXcodeBuild</key>
<string>12C33</string>
<string>14E222b</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions UnityProject/Assets/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UnityProject/Assets/Resources/BillingMode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"androidStore":"GooglePlay"}
7 changes: 7 additions & 0 deletions UnityProject/Assets/Resources/BillingMode.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 14 additions & 7 deletions UnityProject/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"dependencies": {
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.3.2",
"com.unity.collab-proxy": "1.2.16",
"com.unity.package-manager-ui": "2.1.2",
"com.unity.purchasing": "2.0.6",
"com.unity.textmeshpro": "2.0.0",
"com.unity.timeline": "1.0.0",
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ads": "3.7.5",
"com.unity.analytics": "3.6.12",
"com.unity.collab-proxy": "1.14.16",
"com.unity.ide.rider": "1.2.1",
"com.unity.ide.visualstudio": "2.0.15",
"com.unity.ide.vscode": "1.2.5",
"com.unity.purchasing": "4.1.4",
"com.unity.test-framework": "1.1.31",
"com.unity.textmeshpro": "2.1.4",
"com.unity.timeline": "1.2.18",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
Expand Down
Loading

0 comments on commit ca63daf

Please sign in to comment.