speps / XInputDotNet

C# wrapper around XInput, works with any Mono or .NET application (eg. Unity3D)
466 stars 96 forks source link

Error in gamepad.cpp line 54 #12

Closed Skybladev2 closed 7 years ago

Skybladev2 commented 9 years ago

Hello!

I downloaded unitypackage from releases tab and tried to make simple project (https://drive.google.com/file/d/0B8QGeF3SuAgTV09xYWh1NzlDaUk/view?usp=sharing) using Unity 4.6.1f1 Free. I use Windows XP 32-bit.

When I ran this project in editor I saw 2 errors:

License error. This plugin is only supported in Unity Pro!

XInputDotNetPure.GamePad:GetState(PlayerIndex) XInputDotNetPure.GamePad:GetState(PlayerIndex) XInputTestCS:Update() (at Assets/XInputDotNet/Examples/XInputTestCS.cs:27)

and

License error. This plugin is only supported in Unity Pro!

XInputTestCS:Update() (at Assets/XInputDotNet/Examples/XInputTestCS.cs:56) XInputTestCS:Update() (at Assets/XInputDotNet/Examples/XInputTestCS.cs:52)

Then I tried to download source code from repo and try to run it using Visual Studio 2010. But when I try to debug it program immediately exits leaving me following Debug log:

'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'D:\Projects\Unity\XInputDotNet\BinariesX86\Debug\XInputReporter.exe', Symbols loaded. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll' 'XInputReporter.exe' (Managed (v4.0.30319)): Loaded 'D:\Projects\Unity\XInputDotNet\BinariesX86\Debug\XInputDotNetPure.dll', Symbols loaded. The program '[4612] XInputReporter.exe: Managed (v4.0.30319)' has exited with code -2147483645 (0x80000003).

At last I tried to run XInputReporter.exe directly, but it shows following error on startup: error

Line 54 refers to

return gXInputLoader.mGetState(dwUserIndex, pState);

piece of code.

speps commented 9 years ago

I will have to look at this at home. However, as described in the home page of the project (or the README file), this error message in Unity is normal.

Skybladev2 commented 9 years ago

However, as described in the home page of the project (or the README file), this error message in Unity is normal.

Yes, I know it. I forgot to mention that my demo project does not react to gamepad input, so I decided that was the reason of error and tried to find it root.