Similar update to GBA which does the following:
- reduces input lag by 1 frame by reading user input at beginning of cpu loop
- audio and video timing update, which sends audio and video at every frame possible
- add missing sound state variable, soundTicks for gb and gba
Map initial state of axis to 0. This is sufficient for the time being
for the 360 triggers to work better.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Bump libgpg-error 1.27 -> 1.36 and add a patch to support gawk 5.0 from
gentoo.
Add meson to list of msys2 OS deps, this is not needed right now.
Remove glib `CreateFile` patch which has been removed from msys2
MINGW-packages master and add a couple of other patches.
Unfortunately using a newer glib release is not yet possible because of
weird linking errors with meson on mingw.
Add ninja to `host_dists` for `mingw.sh`, this is not needed currently.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Rewrite the `/bin/sh -c command` construct in `command()` correctly.
Update c2man url to the github mirror because it's dead.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
msys2 does not `/bin/command` or `/usr/bin/command`, check for these and
fall back to `/bin/sh -c "command $*"`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Pass command-line arguments to `build_project()` for use in the cmake
command.
Make `$PROJECT_ARGS` override `$CMAKE_BASE_ARGS` for the project.
Override `command()` to call `/bin/command` to avoid the bash builtin
which has undesirable behavior when overriding commands.
Override `gpg` to invoke either the `gpg` or the `gpg2` binary,
whichever is available, or print a warning that gpg is not available.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
SDL APIs like `SDL_JoystickNumAxes(dev)` can return a negative error
code. Handle this case better.
This should fix the fatal exception from trying to allocate an array
with an illegal size (negative, due to the error.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
If the user pauses with the keybinding or the menu `Emulation` > `Pause`
while `Pause when inactive` is enabled, the game should not unpause when
the window receives focus again. It should wait for the user to trigger
the manual unpause.
- Fix#460.
Replace the vcpkg code with a newer and better version. In this version
the `vcpkg` directory is on the same level as the source directory, so
that IntelliSense does not get confused scanning for files.
The cmake variable `VCPKG_TARGET_TRIPLET` is required to activate vcpkg
support, it must be set to e.g. `x64-windows` or `x86-windows`.
Update `CMakeSettings.json` for the new code for the GUI.
Fix a problem copying the `SDL2.dll` file to the binary directory.
Update `README.md` with commandline instructions.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
It looks like that when we use the `Simple` output module, we get
weird errors when trying to load state for any game, most likely due to
memory corruption. AFAIK, it seems the frame buffer is not large enough
to render all components.
This issues does not appear when using OpenGL, or using the Simple with
any display filter available.
Add missing gettext calls for the game controls code.
Seems to work correctly in the Russian locale with special keys.
Also add CLion files to `.gitignore`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
We use the same event for both keybinding and `Emulation` > `Pause`
actions. The issue here is that the menu item is checkable, meaning
that you toggle its value and then run the handler.
The handler checks the value of the menu item `Emulation` > `Pause`,
and toggle the game pause accordingly. Such thing does not happen when
using the keybinding. Hence, it did not toggle the pause as expected.
- Related to #454.
* Fix key shortcuts for save/load states.
We show the wrong description for these shortcuts, although it works
correctly for the keybinding.
* Use the proper labels for save/load states.
Check that SDL reports any available controls for a joystick, otherwise
mark it invalid and close it.
When processing events for joysticks, check that each one is valid.
Set initial value of controls to zero initially not after getting the
initial state, previously we were getting the initial state and
overwriting it with zeroes, defeating the purpose.
Fix memory leak, `curval` array of controls not being cleared.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix `homeDir` `ConfigManager` global pointing to freed memory.
Thanks to @FredericHamel for catching this.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Correct set WXK_NUMPAD_{ADD,SUBTRACT} for default volume controls and
enable users to change it via menu "Options > Key Shortcuts".
Also allow users to use both these buttons for other input.
Some keybindings were not handled by the frame. That includes some
wxAcceleratorEntry keys. On Linux, if you set a key shortcut using a key
with no modifier ("U" for "Input > Configure"), pressing the key would
not lead to anything.
This is very likely related to wxGTK, although it is not possible to
confirm this at the moment.
Whenever users try to remove the system keys shortcuts, the
configuration file is overwritten and only records the last erase.
For example, if we wish to remove all the auto{A,B,L,R} keys at once,
we get the following writes on the configuration file:
NOOP=ALT+1,ALT+2,ALT+3,ALT+4
NOOP=ALT+2,ALT+3,ALT+4
NOOP=ALT+3,ALT+4
NOOP=ALT+4
Only `NOOP=ALT+4` stays for the following execution.