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>
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>
* 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.
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>
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>
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.
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
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.
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.
* 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.
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
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
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
This adds a custom UserInputEvent for handling joypad and keyboard input
for both accelerators and emulator control configuration.
These changes fix a number of issues with the wxWidgets implementation
of key down / up event handling. In particular, every "down" event now
has a corresponding "up" event. All of the special handling that was
done in multiple places to handle shortcuts is now done in a new class,
`UserInputEventSender`, simplifying multiple call sites.
This is another step towards complete unification of UserInput handling,
which will prevent double assignment between shortcuts and emulator
controls.
Bug: #745
This changes most dialogs in the wx frontend to use a common base
abstraction, `dialogs::BaseDialog`. This base class sets up common
style options for every dialog and automatically saves and restores the
dialog position.
In addition, this moves the first time show position of the dialog to be
slightly to the bottom and right of the main window, even if the main
window is on a screen other than the main screen.
Copy the cmake 3.28.3 FindGettext.cmake to cmake/ and comment out the
line that updates the po file from the pot. Because we download po files
from transifex we don't want this.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add the NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM env var to the macOS CI as
faudio has not been marked compatible with macOS yet.
Remove FindGettext.cmake as it is a core cmake module that is available
in the versions of cmake we support now.
Add support for nix to MacPackageManagers.cmake and add brew gettext to
CMAKE_IGNORE_PATH when not using brew. Also update the cmake style.
Add faudio, libintl and the System framework to buildInputs in
default.nix.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Move setting up the environment for macOS Homebrew earlier in
Options.cmake, as well as finding pkgconfig.
Update gcc/clang toolchain to not pass a gcc-specific option to clang.
Add faudio to list of brew packages to get in installdeps.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update from the channels/channel_layout API to the new ch_layout API,
assume two channel stereo always.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Change the find_package() call for FAudio to QUIET to not show a giant
warning when it's not available.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>