Commit Graph

3360 Commits

Author SHA1 Message Date
Rafael Kitover 834c7de86c
build: update macOS builder dists
Update sdl2, faudio, wxWidgets and ffmpeg to the latest versions for the
macOS builder.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-06-06 05:32:51 +00:00
Fabrice de Gans 4f1a5dd726 [Test] Add tests for widgets code
This creates a vbam-wx-widgets target for the custom widgets code and
adds tests for them.
2024-05-29 19:30:35 -07:00
Rafael Kitover 5766b9b9c7
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-27 10:00:25 +00:00
Rafael Kitover 5d8426d317
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-27 09:00:26 +00:00
Rafael Kitover 63ec3528f1
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-26 07:00:24 +00:00
Fabrice de Gans f646c3848c [Test] Change assert to custom CHECK macros
This changes the way we handle asserts to use a set of custom macros.
This greatly speeds up crashing, especially on Windows, and provides
assertions in release mode too.
2024-05-21 18:47:50 +00:00
Fabrice de Gans 09433875bc [CI] Remove workaround for MSVC CI
Upstream GitHub actions now uses a single toolchain version.
Fixes #1297
2024-05-19 16:14:22 -07:00
Fabrice de Gans 05c09ff506 [Build] Add devkitpro-based libretro targets to CI 2024-05-10 13:36:05 -07:00
Rafael Kitover 7f78fbb3c5
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-10 03:00:24 +00:00
Rafael Kitover 261e26f488
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-10 02:00:25 +00:00
Rafael Kitover ed820708af
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-10 01:00:27 +00:00
Fabrice de Gans 5b8b6a0b47 [Test] Add tests for the EmulatedGamepad class 2024-05-09 17:48:48 -07:00
Fabrice de Gans 8809ce26b3 [Test] Add tests for the Bindings class
In addition to fixing a couple of minor bugs, this also creates some
utility functions to access the cmdtab data.

Finally, this disables tests on MSYS2 as they can be flaky.
2024-05-09 13:15:16 -07:00
Fabrice de Gans a48625855b [Build] Share wx-related targets configuration
Breaking the main wx target down to multiple libraries had the side
effect that many build options were not properly applied to libraries.
This fixes the issue by having a common configuration function in CMake
to share most of the configuration between all of the wx-related
targets.
2024-05-09 12:28:05 -07:00
Rafael Kitover 55c1477d69
build: disable FAudio for 32 bit Windows builds
Disable FAudio for 32 bit Windows builds because it uses libraries that
Windows XP does not have.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-09 02:34:25 +00:00
Rafael Kitover 2d7a1ea25b
build: fix faudio linkage regression on MSVC+vcpkg
Followup on 244149c0 (build: fix faudio static linkage, 2024-05-09)
which broke linking faudio on MSVC+vcpkg, go back to using the
FAudio::FAudio cmake target for MSVC.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-09 01:38:44 +00:00
Rafael Kitover 244149c00e
build: fix faudio static linkage
Use "faudio" and dependent dlls on Windows instead of the FAudio::FAudio
cmake target, because the cmake target always links the faudio dll.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-09 01:25:05 +00:00
Fabrice de Gans c0bcf3bfdf [Test] Add tests for many config classes
This also fixes a coupld of minor issues that were found while adding
tests.
2024-05-08 13:08:07 -07:00
Fabrice de Gans 13756bcbf9 [Test] Replace doctest with googletest
* Convert the only existing test (strutils) to googletest.
* Create a test target for vbam-wx-config.
* Add necessary fakes for the test binary.
* Add tests to CI.
2024-05-08 13:00:56 -07:00
Rafael Kitover fc82e06270
build: do not build SDL bin on Windows or macOS
Stop enabling the SDL binary by default on Windows or macOS because it
usually only of interest to Linux users.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-08 12:53:52 +00:00
Rafael Kitover df89beb256
build: disable gpg signatures by default
Add the GPG_SIGNATURES cmake option to control creating gpg clearsign
signatures for the translations and exe zips for UPSTREAM_RELEASE,
defaulting to OFF.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-07 02:59:17 +00:00
Rafael Kitover 82eda48e8f
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-06 06:00:30 +00:00
Rafael Kitover b47787b317
translations: rebuild source .pot
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-06 06:00:12 +00:00
Fabrice de Gans c9668d9a88 [config] Create the vbam-wx-config target
Circular dependencies between the config sub-module and the rest of the
wx frontend have been removed. This change separates the config code to
its own submodule.

This is a preliminary change to improve testing coverage.
2024-05-05 22:57:47 -07:00
Fabrice de Gans 90a56c6937 [config] Move strutils to src/config/
This removes circular dependencies between the main wx target and the
config/ sub-directory.
2024-05-05 21:38:14 -07:00
Fabrice de Gans d377f7abff [CI] Install only one MSVC toolchain
A change in GitHub Actions broke our MSVC build flow due to different
toolchains being used at different steps of the build process. While the
upstream issue will eventually be fixed, we need to explicitly specify
the toolchain version for now.

Bug: #1297
2024-05-05 14:54:58 -07:00
Rafael Kitover 1fac129746
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-05 15:00:20 +00:00
Rafael Kitover af7d5f7b89
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-05 14:00:21 +00:00
Rafael Kitover 28f7c2010b
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-05 10:00:20 +00:00
Rafael Kitover 486330f23d
Activate GitHub Sponsors
Add .github/FUNDING.yml with my username to activate GitHub Sponsors for
this repository.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-05 01:27:11 +00:00
Rafael Kitover 1ae78a04a8
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-05 00:00:26 +00:00
Rafael Kitover c776da7120
translations: rebuild source .pot
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-05 00:00:08 +00:00
Fabrice de Gans d543784a3d [UserInput] Filter key events globally
This changes key events to be filtered globally by the application,
preventing any widget from accessing them. Widgets should instead use
the new VBAM_USER_INPUT_EVENT event.

In addition, this explicitly removes accelerator handling from wxWidgets
main menu, allowing us to populate joystick options in the menu without
firing wxWidgets assertions.
2024-05-04 16:07:25 -07:00
Fabrice de Gans 902c6c8e4b [UserInput] Only process shortcut commands once
This modifies the UserInputEvent class to fire a vector of events at
once, rather than individual down/up events for each UserInput. This
simplifies handling of the global event filter and prevents the firing
of spurious events.

This also fixes a bug when pressing "Ctrl+1" would trigger the command
for both the command assigned to "Ctrl+1" and to "1". Now, only the
"Ctrl+1" command will fire.
2024-05-04 13:38:43 -07:00
Fabrice de Gans d32be9ddbe Move cmdtab and command enable flags to config/
* Moves cmdtab to config/. This removes the dependency on the wxvbam.h
  header from the config/ directory.
* Fixes a number of issues in the shortcuts configuration window:
  * The "Remove" command was not working properly due to an incorrect
    refactor.
  * The window is now fully expandable.
2024-05-04 10:44:06 -07:00
Fabrice de Gans b776509287 [bindings] Set default shortcut for recent file 3
This was lost in translation between 2 refactors.
2024-05-03 17:30:51 -07:00
Rafael Kitover 56eb97c846
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-29 13:00:23 +00:00
Rafael Kitover 9f46c575fd
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-29 10:00:21 +00:00
Rafael Kitover e0402a9b0b
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-28 20:00:23 +00:00
Rafael Kitover 3e30f54d5f
translations: fix strings starting with lowercase
Fix translated strings that start with lowercase to start with
uppercase.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-28 19:16:26 +00:00
Rafael Kitover d73085a88c
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-25 08:00:21 +00:00
Rafael Kitover 8eb6a6900f
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-25 04:00:20 +00:00
Rafael Kitover 3615137c12
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-24 19:00:20 +00:00
Rafael Kitover bbd5b76f2a
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-24 02:00:25 +00:00
Rafael Kitover bb3604f333
translations: rebuild source .pot
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-24 02:00:07 +00:00
Fabrice de Gans 18a0067ca7 [Input] Unify command handling
This unifies command handling between game and shortcut commands. Both
types of commands are now handled in a common manner and the binding
configuration is shared. In particular, this prevents assigning the same
user input (joypad or keyboard) to a game command or a shortcut command.

Bug: #745
2024-04-23 18:02:25 -07:00
Fabrice de Gans cfdbdc4ec2 [Input] Move input configuration objects to app
Previously, some input-related configuration objects were either owned
by `gopts` or global values. This moves these objects to be owned by the
app object instead.

Rather than directly accessing the app object, other objects (like
dialogs) that need to access the input-related configuration objects are
passed a `ConfigurationObjectProvider` function. This will make it
easier to test these objects independently down the line.

Bug: #745
2024-04-23 15:38:39 -07:00
Rafael Kitover 32ca2ae42f
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-23 22:00:25 +00:00
Rafael Kitover bad96cf91e
translations: rebuild source .pot
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-23 22:00:07 +00:00
Fabrice de Gans 62294702e4 [Input] Remove transitional key, mod, joy triplet
Originally, UserInput was built around the key, mod, joy triplet values
to maintain compatibility with other parts of the code base that made
use of these values. Since the UserInput class was introduced, all use
cases have been transitioned off these values in favor of treating the
UserInput as an abstract input.

UserInput is now a simple wrapper around either a KeyboardInput or a
JoyInput structure that only contain data pertinent to their input type.

This concludes the transition to the UserInput type.

Bug: #745
2024-04-23 14:26:59 -07:00