This removes remaining dependencies on Windows in the FAudio code by
removing the device notification code and switching to portable
`condition_variable` for the buffer end notification event.
This moves all of the audio code in the wx frontend to the
`src/wx/audio` folder and simplifies many call sites by having one
generic API to enumerate audio devices and create the audio driver.
In addition, this fixes many corner cases in device enumerations and
moves handling of the default device to the respective audio backends,
rather than pushing it to the UI.
Finally, this changes the `Sound/AudioDevice` setting to use the
underlying device ID, rather than the user-facing name.
Pass `/fd certHash /td certHash` to signtool as they are required
arguments.
signtool comes with Visual Studio and now works and we don't need to
require osslsigncode anymore.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make the regular expression against VCPKG_ROOT less specific for
detecting the default Visual Studio vcpkg, for some reason it stopped
working.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Corrected the current FAudio output code, FAudio api wasn't
a direct 1 for 1 code replacement. Adjusted the existing
code structure so that FAudioVoiceCallBack struct
was being properly called on.
Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
This fixes a number of issues with the current implementation. Namely,
some options were not properly saved and the audio driver was not
properly reloaded when some options were changed.
In addition, this moves most sound-related options to `g_owned_opts` and
simplifies many call sites.
Only pass -Werror=lto-type-mismatch to gcc, clang does not have this
option and throws a warning.
Also quote some barewords in if() statements.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Move CMake dependencies checkout to `cmake/Dependencies.cmake`.
* Disable most dependencies checkout from the `TRANSLATIONS_ONLY` build.
* Remove the debug/translations_only GitHub Action.
Add -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing to
compile and link options for gcc/clang always.
Rename struct yy_buffer_state in src/sdl/expr-lex.cpp to struct
yy_buffer_state_sdl because it breaks when linking the SDL binary with
-Werror=odr.
Fix#1260
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a toggle for SDL GameController Mode in the game key configuration
dialog, default enabled.
On check or uncheck, change the option and reinitialize joysticks, not
using GameController mode if it is disabled.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add faudio to list of optional vcpkg deps linked to ENABLE_FAUDIO.
This codepath is not used right now as we are using binary packages.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Pass -Wno-deprecated-copy only for C++, gcc gives a warning for C.
Pass -Wno-unused-command-line-argument for clang only, gcc gives a
warning about it.
Add a failsafe for gcc/clang static link flags if libstdc++ or
libpthread is not available as a static library.
Move link command adjustment script invocations to src/wx, the target is
not yet defined in the toolchain.
Add -lws2_32 to the end of the link command for gcc on Windows because
of link order issues with those symbols.
Disable LTO for gcc on Windows, as it is broken.
Don't install extra-cmake-modules on MINGW32, that package is not
available there.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Bring back setting the MSYS variable under MSYS2, it's still being used
in a few places.
Link the SDL2::SDL2-static target for static builds.
Add -static-libgcc and -static-libstdc++ to the gcc/clang toolchain for
static builds.
Edit wxWidgets_LIBRARIES under MSYS2 to specify liblzma.a explicitly
because for some reason it's not being linked statically by default for
static builds.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When using vcpkg as the toolchain, pass NO_DEFAULT_PATH to
find_package(wxWidgets ...) so that the default cmake
FindwxWidgets.cmake is not included.
Set wxWidgets_DIR to the
<vcpkg-root>/installed/<triplet>/share/wxwidgets vcpkg port directory
for the subsequent find_package() calls to find the port-installed
wxWidgetsConfig.cmake file.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Apple compiler ID is defined as `AppleClang`. Rather than explicitly
adding every single compiler ID, this changes the build to try to apply
settings for GCC for every non-MSVC-like compilers.
* Bring the wx frontend more in-line with the rest of the codebase.
* Always default to Unicode APIs on Windows.
* Clean up all include guards and headers.
* Create multiple components library. These depend on the core code and
are used by multiple frontends.
* Clean up the filters declaration by moving them to a common header in
`components/filters/filters.h`.
* Clean up the include guards and include orders.
* Fix the modified paths in `src/debian/copyright` to match their new
location.
* Move src/apu/, src/gb/ and src/gba/ to src/core/.
* Clean up include guards and headers.
* Rename `BKPT_SUPPORT` to `VBAM_ENABLE_DEBUGGER` and remove the
`NO_DEBUGGER` define.