On Windows, wchar_t is 16 bits and represents UTF-16 code units.
However, on other platforms, wchar_t is typically implemented as 32 bits
to represent UTF-32 code units. In order to work around this problem, we
always convert the string we get from FAudio, which is represented as
UTF-16 code units, into UTF-8 and let wxString handle the conversion to
its native type internally.
Previously, `wxEVT_KEY_DOWN` and `wxEVT_KEY_UP` were transformed into
`VBAM_EVT_USER_INPUT` and marked as processed early. This broke a number
of controls that rely on the traditional widgets events.
To fix this, we now filter the `wxEVT_KEY_*` and `wxEVT_CHAR` events in
the only widget we use that cares about them, `UserInputCtrl` instead of
filtering them at the application level.
Add core option to mute sound during speedup, implemented in the gba
core. Link the option to the SDL port as well.
Add the new Mute Sound option as a checkbox to the xrc for the
Speedup/Turbo dialog and improve the dialog appearance.
Fix the max values for the options speedup_throttle and
speedup_frame_skip.
Add base class for numeric OptionProxy types implementing the +=, -=
operators, increment/decrement operators and operator T(). Add tests for
these operators on numeric types.
Move Speedup/Turbo dialog code from guiinit.cpp to a dialog class and
rewrite it using validators.
Remove the "GL VIEWPORT" debug prints from panel.cpp.
Fix#865
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use the __WXGTK3__ macro to check for GTK3 when setting the gdk backend
to X11 when Wayland EGL is not available, GTK2 does not have this
function and always uses X11 anyway.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
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.
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.
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.
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.