Questions tagged [joystick]

For questions about joysticks.

496 questions
0
votes
1 answer

C# reading joystick input without blocking UI

This will probably sound strange for some of you, but I can not figure out right way to read joystick input without blocking my UI form. I have found this example on internet: static void Main() { // Initialize DirectInput var directInput =…
linux_fan
  • 3
  • 1
  • 4
0
votes
0 answers

Using Joystick in Windows Forms application

I've got a problem with my application. I wrote a code that works fine in console, but I need to make a GUI. This application let me control a mouse with joystick. I'm using Direcinput library. It is reading position of joystick and its name. Here…
user3448282
  • 2,629
  • 3
  • 25
  • 47
0
votes
1 answer

programming joystick in DirectInput

I'm writing application to program Joystick using DirectInput and MFC. I have found a script how to do it, but i have a problem. When i want to enumerate devices to find joystick I use right function "EnumDevices" with argument "enumCallback" which…
Tibo
  • 53
  • 2
  • 6
0
votes
1 answer

SDL_Jostick is sending weird ints

I'm having some issues trying to use SDL (version 2.0.3) for handling multiple game controllers in a SDL/OpenGL/C++ program. I'm updating events using a SDL_PollEvent(&m_events) loop and looking for SDL_JOYBUTTONDOWN (or…
Klowx
  • 48
  • 3
0
votes
1 answer

Correlating traditional Windows joystick axes with HID

I'm a bit confused on the description of joystick axes and I'm hoping that someone has a link or document which could help clear my confusion. I'm not a Windows guy, so trying to port some traditional Windows gameport code has me a bit confused. We…
wadesworld
  • 13,535
  • 14
  • 60
  • 93
0
votes
2 answers

Program is entering a switch case when the requirements haven't been met

So I created a program that uses two joysticks. Each joystick is in a relative layout with the thumb of the joystick being trapped inside the layout and returning the values of the margin which I use as the X and Y values. Here is my listener…
Shizz
  • 43
  • 6
0
votes
1 answer

pygame joystick slows down event handling

I am using a function to wait until a controller is present, but i ran into a problem. I wanted the function to stop when I press a key. Usually these events are handled just fine, but in this part it works terrible. The event seems to be added to…
D-Inventor
  • 450
  • 5
  • 23
0
votes
1 answer

Joystick support in GameMaker game for android

Does GameMaker support or is compatible to any joystick connected to an android device? If so is there any tutorial or documentation for implementation.
NerdBoy
  • 3
  • 3
0
votes
1 answer

SDL2 jbutton enum?

I'm having some trouble figuring out what enums I can/should use for SDL2's gamepad/joystick support. I tried using "SDL_CONTROLLER_*", but I ended up with some odd results. For instance: SDL_Event e; while (SDL_PollEvent(&e) != 0) { …
SpikeMF
  • 40
  • 5
0
votes
0 answers

iOS Joystick Event

i have a question to handle a digitial joystick for iphone: they joystick - innerThumb - moves to the position u touch on the display. But it should only start move, when u toch the thumbPic. The Code: - (void)makeHandle { self.handle = [[UIView…
Tobias
  • 95
  • 1
  • 9
0
votes
1 answer

Why js_event.type is always 0?

I wrote the following code to handle a joystick on Linux: static int fd; int joystick_init(void) { struct js_event event; if((fd = open("/dev/input/js1", O_RDONLY | O_NONBLOCK)) == -1) return ERROR; //ignore all init events …
2013Asker
  • 2,008
  • 3
  • 25
  • 36
0
votes
0 answers

Registering a callback in C++ from a joystick device library

I found a library to handle joystick USB devices in C++ in simple cross-platform gamepad library so I am trying to attach the callbacks from it to my application. So it has the following definitions struct Gamepad_device { unsigned int…
Rego
  • 1,118
  • 1
  • 18
  • 40
0
votes
2 answers

Android - InputManager.InputDeviceListener NewApi exception

I want to catch events from keys and motion events from joystick connected to my Android. I'm using InputManager.InputDeviceListener but the minimal API level supported is 14 and InputManager.InputDeviceListener requires API level 16. Do you know a…
Florian Mac Langlade
  • 1,863
  • 7
  • 28
  • 57
0
votes
1 answer

Joystick input only moves object diagonally

I have a problem with the singe joystick script usage in Unity. I use the below script for the movement of a chopper via a rigidbody. When I test the game in unity with the arrow keys, everything works perfectly as expected. However, if I test this…
Killbert
  • 171
  • 1
  • 4
  • 16
0
votes
2 answers

Inverting one joystick value to get an average sensitivity of two joysticks

I am trying to get an average sensitivity level between two joysticks Y axis. Fully pressed UP is a value of 0 Fully pressed DOWN is a value of 100. (So I'm basically working with percentages) The neutral zone (when the stick is not being pressed)…
Partack
  • 886
  • 11
  • 24