On the ubuntu and mac jobs, try re-enabling the `--help` check, it
should now work thanks to @denisfa's work on a57e51f6.
If this works we also want to use wine for the mingw jobs to do the
same.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The mxe package server key has been removed from the keyservers, allow
apt-key to fail and add `--allow-unauthenticated` to the apt-get
options.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Add support to save/load geometry options for GUI window.
* Refactor code to use wxWidgets functions to get window geometry.
* Call update_opts() from ::OnSize and ::OnMove functions.
`stretch` mxe binaries are failing due to missing libraries like
`libssl.so.1.1`, try to use the `trusty` repo instead.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Disable the `--help` test for now, for some reason the exit code is 255,
something is still not quite working there.
Update installdeps to force a partial upgrade from trusty to xenial on
travis to get a newer version of libcurl-gnutls, which is necessary to
use the mxe package server.
Fix mxe package server repo url.
Add `mirror.mxe.cc` to list of apt hostnames to ignore SSL errors for.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The mxe pkg server seems to be back online with some changes, and an
invalid SSL certificate.
Also thanks to @denisfa's work on 7373da15 we can re-enable the `--help`
check on travis.
Let's see if this works.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Store the full relative path to found `.rpi` plugins, relative to the
standard Plugins directory, as specified by wxWidgets.
This fixes the problem of plugins being in a subdirectory while only the
basename was stored, making the plugins unusable.
This is done by using `wxFileName::GetFullPath()` instead of
`wxFileName::GetFullName()` with a relative filename instance.
Make a `GetPluginsDir()` method on the app class to simplify getting
this directory, and for possible future overrides.
Also make some minor, functionally equivalent changes to
`get_config_path()` in `wxvbam.cpp`:
- use the new `GetPluginsDir()` method for the plugins directory when
building the config file search path
- print the XdgConfigDir on all platforms, since the function works on
all platforms
- make a `add_nonstandard_path` macro which duplicates the `add_path`
macro for wxWidgets standard paths but for any arbitrary string path
- use `wxFileName` methods to make the XDG config directory path instead
of string concatenation
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Add XDG Base Dir Spec for other Unix alike platform.
* Add XDG Base Dir support for the fallback on SDL port.
* Add migration for Unix configuration file.
We migrate from 'vbam.conf' to 'vbam.ini' automatically.
* Refactor code for portability of dir creation functions.
* Fix for MacOS compilation directive.
Remove the "wrote battery" system message that is painted on the panel,
because it annoys people, and show errors writing the battery with
`wxLogError()`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
We check if `$HOME/.vbam` exists; if it does, then we use
`$HOME/.vbam/vbam.conf`; otherwise, use
`${XDG_CONFIG_HOME:-$HOME/.config}/visualboyadvance-m/vbam.conf`.
The MBC3 and TAMA5 battery formats save the RTC data including a
`time_t` field which is the last field.
Since `time_t` is 32 bits for 32 bit builds and 64 bits for 64 bit
builds, pad it in the two battery structs with a `uint64_t` and detect
the 4 byte shorter saves made by older 32 bit builds.
Also remove some pointless code in save state reading that also uses
`sizeof(time_t)`.
Add two new constants for RTC data size in gbMemory.h and use them.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Generalize regex and glob against `wx/config` scripts in
`Toolchain-cross-m32.cmake` to work on gentoo, which can append the
`-gtk3` suffix.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
For some reason on Ubuntu 14 (trusty) cmake translates `<INCLUDES>` in
`CMAKE_ASM_NASM_COMPILE_OBJECT` as a literal `INCLUDES` which produces
an error, remove it because we are not using it anyway.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Do not add the -fPIC (position independent code) compiler flag on 32 bit
x86 architectures because that breaks inline assembly, and some included
libraries like fex require inline assembly to work.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a "Factory Reset" item to the Options menu, which calls
`DeleteAll()` on the config object, which actually deletes the config
file. After this the application is relaunched asynchronously without
parameters and the current instance is closed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When using msys ccache with a mingw ninja, the compiler fails to
execute.
Don't try to detect ccache when using the Ninja generator on msys2, it
can still be specified through cmake variables.
Do not check for the mingw ccache because it is broken and I will assume
not being used.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Conditionally compile out the code for the feature implemented in
16dd5d40 (which is the throttle and frame skip configuration for the
speedup button) for libretro, and use the old behavior of skipping 9
frames.
Affects GBA.cpp and GB.cpp .
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add Speedup / Turbo configuration panel which allows setting the
throttle or number of frames to skip for when the speed key is pressed
or turbo is enabled (which just presses the speed key.)
Throttle and frame-skip are mutually exclusive, throttle must be 0 (no
throttle) when number of frames to skip is non-zero. The dialog controls
handle this.
This is implemented in the core in GBA.cpp, GB.cpp and ConfigManager.
Two new options are added both in ConfigManager and in the wx options,
speedup_throttle and speedup_frame_skip, the defaults are:
```
speedup_throttle = 0 (no throttle)
speedup_frame_skip = 9
```
this was the original behavior.
Add support for unsigned ints to wx/opts.cpp for these and for throttle,
this requires a new validator wxUIntValidator to use them in spin
controls.
Clean up appearance of the throttle spin control in the General dialog.
Maximum throttle and speedup_throttle is 600, values much over 500 will
not behave differently from 0 on modern hardware.
Maximum frame skip is 30 at the moment.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add wxEXPAND spacers to frame wxBoxSizer on the top and bottom around
the drawing panel so that panel is correctly centered if maximum zoom is
set.
Set proportion to 1 on the spacers and 0 on the panel so that both
centering with maximum zoom and full expansion work correctly.
Refactor frame OnSize event: pass a dummy userdata pointer to
distinguish resizing the frame from resizing the panel, and call
Layout() when the frame is resized.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Test for the -fdiagnostics-color=auto compiler option supported by gcc
and probably clang, and turn it on if it's available.
This option colorizes compiler warnings/errors/etc. when output to a
terminal.
Also fix a typo above when adding the -fopenmp flag.