In StartRFUSocket() in gba/GBALink.cpp move a postincrement out of an
expression to a following statement, because the evaluation order is
undefined.
In GetDevices() in wx/openal.cpp replace an #else with an #endif so that
the function has a default return statement visible to the linter.
In FilterThread::Entry() add a `return 0;` (ExitCode) statement at the
end even though it is probably never reached.
In the TransferToWindow() for the positive double validator widget in
wx/widgets/wxmisc.cpp add a default `return true;`, for the rare case
there is no double value, in which case the string representation would
be displayed (since it is a subclass of wxGenericValidator(wxString&) .)
A couple files that use the std::ceil() math ceiling function were not
including the required header <cmath> and this seemed to have been
causing build errors on some Linux distributions.
Add the necessary #include <cmath> statement to both files.
If _GNU_SOURCE is defined on linux, then strerror_r() is an alternate,
non-POSIX version.
Undefine _GNU_SOURCE when including <string.h> in ConfigManager.cpp to
get the POSIX version of strerror_r(), and initialize the error string
buffer to "unknown error" so that the code does not crash whichever
version of the library function is being used, or strerror_r() fails for
some reason.
By default the SDL port tried to save the battery to a nonexistant
directory in saveDir, because if (saveDir) {...} evaluted to true since
saveDir was a non-NULL pointer but empty.
Change sdlCheckDirectory to return a bool indicating if the directory is
good or not, and if not set screenShotDir, saveDir and batteryDir to
NULL so that code that checks for their existance works correctly.
Following up on 1ba2eef which fixed a crash caused by trying to write to
a NULL FILE* due to fopen() failure: write the error message to stderr
instead of trace.log and show the OS error using strerror_r().
glibc's fclose implementation does not do a NULL check and will crash on "fclose(NULL)". A bunch of Fedora users have been sending in traces for this issue. I've added a log on failure case, likely if the user does not have permission to write to the file.
Add a link to the Joystick page in the Arch Wiki so that users hopefully
use it to troubleshoot their joystick issues before filing an issue.
Also note that any joystick issues would be SDL related.
In d1918c12 I manually sent a SIZE event to the DrawingPanel after
calling Layout() in the setup code in OnIdle().
But the obvious problem is that the ->Connect() calls to set up the
event handlers, including SIZE, are after all the setup code including
the Layout().
Move the ->Connect() calls to the top of the setup code and remove the
manual SIZE event sending. This is a much better solution that for some
reason I didn't notice at the time.
Tested to also fix the problem.
When installing rpmfusion repos, try going back up to 3 releases in case
the latest rawhide release does not have an rpmfusion repo, and install
the repo packages with --nodeps so that they don't conflict with
system-release(XX).
If installing rpmfusion repos fails, continue without ffmpeg (and adjust
build instructions accordingly.)
If ffmpeg fails to install for any reason, show a warning and adjust
build instructions.
When calculating 32 bit dependencies, look only for -devel packages, and
match only -devel packages when checking for corresponding -32bit-devel
packages.
Add the `m32` parameter to ./installdeps to fetch 32 bit multilib
dependencies on Fedora, Arch and Solus linuxes and add a cmake toolchain
file to build with them.
For MSYS2 support both an `m32` and an `m64` to choose deps for 32 bit
or 64 bit mingw targets.
Adjust build instructions from ./installdeps to support both usages.
Other changes:
- use --nogpgcheck --best --allowerasing for dnf invocations for Fedora,
the --nogpgcheck is necessary when Rawhide is confused about which
keys it has, and the latter two are needed for upgrades that remove
unneeded deps etc
- when finding GTK2, first try using pkg-config, and only fall back to
the cmake script when that fails, pkg-config works better for cross
builds
- add cairo to dep lists in ./installdeps for the time being
- for arch, list individual packages from base-devel instead of
base-devel that do not require gcc-libs because of potential conflicts
between gcc and gcc-multilib
Multiple previously specified packages are either already in system.devel or are dependencies of items such as libgtk-2-devel or libgtk-3-devel, dependencies of those dependencies, etc.
The inline assembly in src/gba/GBA-thumb.cpp which is turned on with the
cmake ENABLE_ASM_CORES option, sometimes causes weird behavior on
windows (see: #54) and a crash on startup in linux (see: #98, confirmed
on both Fedora and Arch Linux.)
Previously the default for this option was ON for 32 bit builds, set the
default to OFF always for the time being, until it is either fixed or
replaced.
Because of how asm subroutines are linked to C/C++ programs,
src/filters/2xSaImmx.asm had an %ifdef __DJGPP__ (the DOS port of gcc)
with the subroutine names prepended with an extra underscore.
In 902a7a7e I removed the %ifdef and just kept the extra underscore for
all symbols, and this worked fine until #98 where some version of Fedora
did not like that and would not link the code.
So adopt the behavior of the other asm filters, which have a NEWSYM
macro that defines the symbol name both with and without the extra
underscore, by listing the symbol twice, both with and without the extra
underscore, this is confirmed to fix the linking issue on that Fedora
build host.