The config option name enum needs to match the actual enum, since the
value is an integer. Unavailable APIs are not shown using #ifdefs in
guiinit.cpp.
Also reorder the radio button xrcs to be in the order of the enum.
One bug noted in the #88 discussion is that when a joystick button is
held down, keyboard shortcuts do not work.
Rewrite the logic for process_key_press() to only block further
wxWidgets event propagation if the actual key pressed is a game key, not
if any game keys are being held down.
This takes care of all the issues in #88.
TODO:
- investigate other joystick issues
On joystick event notification, filter out axis values that are equal to
their initial state.
The reason for doing this is explained in 539027ca. Triggers on e.g. the
360 controller are an axis that are the max negative value in the
depressed state, and for some reason a constant stream of events are
generated for them, that's another issue that needs to be addressed.
For the time being, this fixes the other half of the main issue in #88:
users with an old config with the default special key bindings will now
be able to use keyboard hotkeys as these spurious joystick events will
be filtered out and will not block keyboard events.
TODO:
- stop generating events for depressed triggers in the first place
- fix joystick events completely blocking keyboard events
Move the new faudio driver constant AUD_FAUDIO to the end of the sound
driver enum, otherwise the wrong is used.
Also check for NO_OAL before instantiating an openal driver.
Add cmake code to find and link faudio if enabled.
Fix typo for get devices faudio method in wxvbam.h
Selecting the faudio driver now works, but the driver not does
unfortunately.
Fix name of FAudio option XRC control: "FAudio" and not "Faudio".
Create list of valid sound driver options by using macros for the ones
that are compiled in (with windows being a special case.)
The default keyboard/joystick bindings for the "special" keys have
assumptions about axis numbers that do not hold with modern game pads.
For reference, the 360 controller has the following mappings:
Axis 0/1: left stick
Axis 3/4: right stick
Axis 2: left trigger
Axis 5: right trigger
This triggers another bug causing the depressed state of a trigger axis
to fire continuously. In this case, this is the left trigger on a 360
controller which is axis 2.
This triggers yet another bug where a stream of joystick events blocks
keyboard events from registering, resulting in hotkeys like ctrl+p to
pause not working.
Replace all joystick binds for special keys with null values.
With this change, a default installation of vbam will not trigger the
hotkeys not working bug when a joystick is plugged in.
The other bugs here mentioned also need to be fixed.
When trying to do the necessary edits to linklibs.rsp or link.txt for
static linking, first check if the files were created by cmake,
otherwise a fatal error is generated.
For msys2 dependencies in installdeps, make sure to only install msys2
layer ccache and NOT the mingw ccache, because the mingw ccache is
completely broken.
Set the var CC_FOR_BUILD=gcc in the core build environment. This is used
by libgpg-error to make host build tools when cross compiling, may be
used by other things as well.