Use the wxString-returning form of wxRegex.GetMatch() because the bool
form always returns true if the initial match succeeded, causing every
hat direction in the config to be interpreted as north, the first
condition in the if statement.
Fix#1192
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove all extra dists for ffmpeg deps since we only use core ffmpeg,
adding those in the first place was a mistake.
Remove libogg and liborbis and stop building sfml-audio, since we only
use sfml-network.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Bump openssl, curl, glib, sdl2, sfml, wxWidgets and ffmpeg.
Add support for DIST_INSTALL_TARGETS in order to use `make install_sw`
instead of `make install` for openssl because installing the man pages
and symlinks to them is very painfully slow with my install code. It's
even more painfully slow with whatever whoever did to my macOS virtual
machine.
Add `brew unlink openssl@3` in the brew setup code because someone broke
my compiler and it's not giving precedence to the include directories
passed on the command line, breaking the build.
Remove `-stdlib=libc++` from compiler flags. This was only necessary
when using a 10.7 macOS target, which has both libstdc++ and libc++,
libc++ being the newer and current distribution of the C++ standard
library for clang and macOS. We are now using a 10.10 macOS target which
does not have the old libstdc++, and this compiler option no longer
exists, causing a build failure in glib due to -Werror and an unused
command line option warning.
Remove my patch to link gettext statically for glib, this has been fixed
in the newer versions.
Install meson using pip in the python3 POST_BUILD instead of using a
dist.
Add the variables MAKE and MESON to point to the respective invoking
commands.
Check for /usr/bin/perl before /usr/local/bin/perl, the brew perl no
longer works but the macOS perl does.
Fix overwriting meson with a symlink when meson has already been
installed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Start Network Link is not allowed while Local mode is selected, but
state change of Local mode was ignored until an option which triggers
EnableNetworkMenu() was selected.
Removed EnableNetworkMenu() from the Configuration option because it
doesn't change anything related to Link menu state.
Add references to frameworks being linked to `buildInputs` in
`default.nix`. Remove `-framework System` from `wxWidgets_LIBRARIES` in
the cmake code as it's not necessary and nix does it have it in
`darwin.apple_sdk.frameworks`.
TODO:
Debug build currently builds and runs. Release build builds but does not
run because of a problem with the dylib bundling.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add openal, which was missing, and pcre2 which is required by glib,
which is an indirect dependency.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
On initialization, if wxWidgets was compiled without EGL support, check
in environment variables if running under Wayland and if so tell GDK to
prefer using an X11 backend, causing the program to launch under
xwayland.
Fix#1028
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
In doMirroring() do nothing if the ROM size is greater than 32MB. This
fixes these ROMs automatically working without disabling mirroring in
settings.
Fix#1046
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update the default.nix, which is used on nixOS and other nix
installations for loading the build dependencies into a shell for
building.
Update the wxWidgets package to wxGTK32, the current version.
Add an if statement to check for macOS and load the right package set
for it.
Building with nix on macOS does not currently work, but the build
dependencies do work now.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Change CI actions to a matrix with cmake options, for both release and
debug builds, with ENABLE_LINK=OFF and ENABLE_SDL=ON configurations, for
all 3 runners.
Also add both g++ and clang++ to the matrix for the Ubuntu runner to
test on clang.
Disable the macOS workflow for now because brew is failing to install
dependencies.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The NO_LINK build had bitrot and was no longer building. This fixes the
issue by properly disabling Link-related code, including unreachable
functions when the project is built with ENABLE_LINK=FALSE
Update installdeps for Debian to find the new version wx packages, but
still use the -gtk3 variants on very old versions of Debian.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Previously, MBC7 EEPROM was saved at address 0xa000 in memory, rather
than inside the `gbRam` data buffer. This was inconsistent with other
mappers, resulting in issues like the EEPROM data being cleared on
`gbReset`.
Fixes#1173
Fix Mac build regression caused by 2407923f (build: fix cmake version
warnings, 2023-08-26) due to vbamcore and vbam targets using C++11 but
no longer being compatible with it.
When cmake_minimum_required() was set to a much older version, the
CXX_STANDARD property for vbamcore and vbam were ignored.
With the change mentioned above setting a higher
cmake_minimum_required(), the -std=gnu++11 flag started being passed when
compiling these two targets, making them fail due to recent changes no
longer being C++11 compatible.
Set cmake_minimum_required() to 3.8.2, the first version of cmake
supporting C++17, remove the CXX_STANDARD and CXX_STANDARD_REQUIRED
properties from these two targets, and set CMAKE_CXX_STANDARD to 17 to
set this property to C++17 for all targets in the project.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
To fix some cmake dev warnings in recent cmake versions, move
cmake_minimum_required() to before project() and set the minimum
required cmake version to 3.5.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Since Wii and Wii U are both big-endian systems, we need to call in the Makefile for Libretro cores that these must use big endian code for be able to work, otherwise the emulation will just give a white screen.
Fix by Ploggy, many thanks to him.
Since Wii and Wii U are both big-endian systems, we need to call in the Makefile for Libretro cores that these must use big endian code for be able to work, otherwise the emulation will just give a white screen.
Fix by Ploggy, many thanks to him.
Separate writing the version into the Info.plist on macOS into a
separate action from the online updates Sparkle framework into a
separate POST_BUILD action because we are not using Sparkle for macOS
builds right now due to codesigning issues.
Also sort tags by reverse tag name in the cmake git version extractor
because a tag was rewritten.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
CMAKE_CROSSCOMPILING is true when building arm64 on an x64 host, so
ignore this on MSVC.
Eventually we want to run osslsigncode through wine when cross compiling
for win32 on other platforms, or use the native signtool.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Check if the OpenGL context is valid on every operation, and if not
re-initialize it. Also rebind the textures every time the frame is
drawn.
Also rename the SetCurrent method to SetContext, which is clearer.
Fix#643Fix#767Fix#840Fix#843
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make a bool SetCurrent() wrapper over checking the wxGL_IMPLICIT_CONTEXT
define and executing the appropriate behavior to set the OpenGL context.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Change the cmake code to install the translations gettext .mo files into
the .app bundle for non-release builds too.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
First launch would fail because wx does not create the configuration
directory by itself if it does not exist.
This also fixes an incorrect menu option.
Update glib/gvdb to fix a compile error with newer clang compilers.
Add link flags for ffmpeg to link the static libraries and frameworks it
needs.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The lz77 uncompresssion software BIOS implementation was exiting early
when uncompressing data, if the overall length was larger than
advertised in the function parameter. However, real GBA BIOS does read
further than the advertised length, so we do here too. This fixes
Advance Wars title screen.
This also adds a SoundDriverVSyncOn implementation, silencing an error
for some Shrek games, though they still cannot properly boot with an
emulated BIOS.
Fixes#789