Remove esc to quit key bind #298.
Remove ctrl+x (cmd+x on mac) to quit key bind #334.
Remove FilterEvent app method, it is no longer being used anyway as key binds
work correctly.
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.
When connecting the debugger the debugger variable was
being set to true before setting up the dbgMain and other related
function pointers. This caused the idle loop to attempt to call dbgMain
which was still NULL. This change makes sure that debugger isn't
set to true until all function pointers are set and that when disconnecting
the remotePort variable is reset back to 0 so we can reconnect properly.
The latest version of gdb from devkitpro expects slightly
different response to some of the remote queries. For instance
when sending back the current thread id there should be no
space or dash between 'm' and the thread id. Additionally a
handful of other common remote gdb query params were
added to better support current versions of gdb
https://github.com/llvm-mirror/lldb/blob/master/docs/lldb-gdb-remote.txt
The qHostInfo command is listed as a high priority to implement for gdb
stubs that lldb can connect to. Adding support for this command allows
lldb to properly connect with it's `gdb-remote 55555` command and
correctly determine the target and allow debugging.
When doing a remote memory read the debugger can ask for any size.
The buffer being allocated however was only 1024 bytes long and the
code in remoteMemoryRead also attempts to write a zero byte at the
end of the array. This code will now take the count of bytes the debugger
is trying to read and allocates a buffer that is count * 2 + 1 large. This is large
enough to hold the $02x formatted hex byte for each byte as well as the zero
byte written at the end.
If the packet passed into remotePutPacket was 1024 bytes or
larger then the buffer array would not be large enough to hold
the $, checksum and zero byte written. This now allocates a buffer
of size count + 5 to accommodate these extra characters.
Use the IsWindowsVistaOrGreater() function from VersionHelpers.h, which
fortunately is part of mingw, to check for the availability of the
comctl32 LoadIconWithScaleDown API, which we use to fix issues with the
app icon, like the icon being too big in the volume mixer.