VOGONS

Common searches


First post, by bozalina

User metadata
Rank Newbie
Rank
Newbie

I've attached an XBOX 360 controller for Windows to my Win7 x64 box. It seems as though it's not receiving the jaxis_0_2 (+ & -) event, which is the left and right rotation for the right hand analog stick. All other joystick events work fine.

I've tried setting the joysticktype to fcs and ch, but neither have helped. I've also tried adding mappings to the events in the keymapper, and editing mapper.txt directly, but neither have any effect. I believe it's a problem with the device itself, rather than the key mappings. Here's my command window when I launch the game:

DOSBox version 0.74 Copyright 2002-2010 DOSBox Team, published under GNU GPL. --- CONFIG:Loading primary settings from config fi […]
Show full quote

DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file dosbox.conf
MIDI:Opened device:win32
One joystick reported, initializing with 4axis
Using joystick Controller (XBOX 360 For Windows) with 5 axes, 10 buttons and 1 hat(s)

Is this a known issue anyone else has experienced, and if so, is there a solution?

Last edited by bozalina on 2010-07-20, 21:00. Edited 1 time in total.

Reply 1 of 4, by bozalina

User metadata
Rank Newbie
Rank
Newbie

Update:

I got the source to see if I could find a way to fix this in the mapper. As I expected, it catches the events for all joystick axes except jaxis_0_2. Here, for instance, is my callstack for binding a key to axis 3:

>	dosbox.exe!CJAxisBind::CJAxisBind(std::list<CBind *,std::allocator<CBind *> > * _list=0x00ad5244 [2](0x00ade928 {group=0x00ad4da0 axis=3 positive=false },0x00ade830 {group=0xcdcdcdcd axis=3452816845 positive=true }), CBindGroup * _group=0x00ad4da0, unsigned int _axis=3, bool _positive=false)  Line 539	C++
dosbox.exe!CStickBindGroup::CreateAxisBind(unsigned int axis=3, bool positive=false) Line 843 + 0x45 bytes C++
dosbox.exe!CStickBindGroup::CreateEventBind(SDL_Event * event=0x0030d23c) Line 694 + 0x20 bytes C++
dosbox.exe!BIND_MappingEvents() Line 2176 + 0x29 bytes C++
dosbox.exe!MAPPER_RunInternal() Line 2345 C++
dosbox.exe!MAPPER_Run(bool pressed=false) Line 2310 C++
dosbox.exe!CHandlerEvent::Active(bool yesno=false) Line 1559 + 0xf bytes C++
dosbox.exe!CTriggeredEvent::DeActivateEvent(bool __formal=true) Line 149 + 0x1a bytes C++
dosbox.exe!CBind::DeActivateBind(bool ev_trigger=true) Line 251 + 0x1a bytes C++
dosbox.exe!CBindGroup::DeactivateBindList(std::list<CBind *,std::allocator<CBind *> > * list=0x00ac872c [2](0x00ad6d80 {key=SDLK_SEMICOLON },0x00add458 {key=SDLK_SEMICOLON }), bool ev_trigger=true) Line 1258 C++
dosbox.exe!CKeyBindGroup::CheckEvent(SDL_Event * event=0x0030db98) Line 504 C++
dosbox.exe!MAPPER_CheckEvent(SDL_Event * event=0x0030db98) Line 2155 + 0x29 bytes C++
dosbox.exe!GFX_Events() Line 1423 + 0x9 bytes C++
dosbox.exe!Normal_Loop() Line 143 C++

Is there somewhere else I could check in the code to see if events are being fired from this joystick axis? I'm completely new to Dosbox, so I'm not sure where else to look.

Reply 3 of 4, by bozalina

User metadata
Rank Newbie
Rank
Newbie

You're correct, the jaxis_0_2 events are invoked by the trigger buttons on the top of the Xbox 360 controller. However, as far as I can tell, moving the right analog stick in the + or - X direction doesn't invoke any events in the contoller's keymappings. Is this correct, or is there a way to get events when moving the analog stick in this direction?