Coder Social home page Coder Social logo

Comments (6)

Tape-Worm avatar Tape-Worm commented on May 31, 2024

I cannot reproduce this on my end. I've used the code you've provided, and it all works fine under x64 and AnyCPU for me.

AnyCPU should automatically use x64 instructions if your OS and machine are x64, so switching to x64 explicitly shouldn't be causing any problems as it's essentially the same (ensure you have Prefer 32 bit unchecked in your project properties).

The only thing I can recommend is moving your code from the constructor to the Form_Load event. You really shouldn't be putting heavy duty code like raw input in your constructor anyway.

from gorgon.

dominota avatar dominota commented on May 31, 2024

Thank you,
I changed the code (like in this link (1.2MB)) but i did not get success.
https://mega.nz/file/abpxxJjK#y0HQbvzJtTzeiOOPOJI0vIVFIf0hvbuM8yre1_Af3Lc

The version of graphics library is Gorgon_3.0.96.088.zip from this link: https://github.com/Tape-Worm/Gorgon/releases/download/v3.0.96.088/Gorgon_3.0.96.088.zip

Can you have a look on it?

Thanks

from gorgon.

Tape-Worm avatar Tape-Worm commented on May 31, 2024

I ran it, and it worked fine for me.

Can you describe your hardware setup? It's entirely possible that some device on your system is causing some unexpected behaviour.

from gorgon.

dominota avatar dominota commented on May 31, 2024

if I directly use SharpDX.DirectInput then it works:

`SharpDX.DirectInput.DirectInput mInput = new SharpDX.DirectInput.DirectInput();
SharpDX.DirectInput.Keyboard mKeyboard;
mKeyboard = new SharpDX.DirectInput.Keyboard(mInput);
mKeyboard.Acquire();

...
KeyboardState ks = mKeyboard.GetCurrentState();`

My computer: Dell Intel Core i7-4700
OS: Windows 10 x64 build 18362.900 Version 1903
Graphics card:NVIDIA Gefore GT 1030
Keyboard (usb): Lenovo LXH-EKB-10YA
Mouse(usb): Logitech 100Mr

from gorgon.

Tape-Worm avatar Tape-Worm commented on May 31, 2024

DirectInput is not RawInput. They're quite different. But if it works for you, then that's great.

The hardware looks normal enough to me. Unfortunately, without knowing what data is being returned from the Win32 RawInput API on your system (particularly in x64), I can't really say why it won't work for you.

You could try using the debug version of Gorgon's assemblies and capture the detailed version of the exception information.

from gorgon.

dominota avatar dominota commented on May 31, 2024

Thanks @Tape-Worm , still the same error.
i will use Input from SharpDX

from gorgon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.