Commit Graph

2621 Commits

Author SHA1 Message Date
Rafael Kitover b757048203
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-11-03 00:21:44 +00:00
Rafael Kitover 8c14138782
transifex pull, delete en.po
Update `de.po` from transifex and delete `en.po` as it seems to not be
managed by transifex.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-23 16:46:43 +00:00
Rafael Kitover d0d22b3068
cmake: copy wxrc from vcpkg build if not exists
Do not copy the `wxrc.exe` from the vcpkg build tree if it has already
been copied, as in the case of the appveyor vcpkg installed cache.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-21 14:19:56 +00:00
Rafael Kitover c06e3bf3fc
cmake: update vcpkg mod for appveyor build cache
On appveyor we only cache the `vcpkg/installed` directory, so vcpkg
itself still needs to be pulled from git.

Also update vcpkg from git if it has already been cloned, and always
rebuild vcpkg itself.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-21 13:58:55 +00:00
mudlord 0535d5c797 Optimize CRC32. 2019-10-21 13:25:19 +00:00
Rafael Kitover a90f4663a5
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-20 08:16:36 +00:00
Rafael Kitover b8f2c8977e
appveyor: use vcpkg installed not whole vcpkg
Try to cache only the `vcpkg/installed` directory instead of the whole
vcpkg directory, which appveyor says is too large to cache.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-18 01:28:09 +00:00
Rafael Kitover 252d3f65ab installdeps: detect correct mxe apt repo
Try to guess the correct mxe apt package repository based on
`lsb_release` codename.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-17 22:25:56 +00:00
orbea 7f6337b1c7 travis: Make xenial the main distribution.
The end of standard support for trusty ended in April 2019 and
the end of life is April 2022. For xenial the end of standard
support is April 2021 and the end of life is April 2024.

Most users should have xenial or newer at this point.

Source: https://wiki.ubuntu.com/Releases
2019-10-17 22:24:45 +00:00
orbea 73a2450247 travis: Test --help on osx. 2019-10-17 22:23:50 +00:00
Rafael Kitover 36790074c3
cmake: fix linking to libssp and linking bin2c
Only add the macro `-D_FORTIFY_SOURCE=2` if we are linking to libssp
with gcc, do not use it at all on clang.

For `HostCompile.cmake` add the macro `-Dmain=main` to redefine the
macro added by SDL2 to compile flags `-Dmain=SDL_main`.

Fix #548.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-17 21:53:15 +00:00
orbea eaa744cc2e cmake: Add generate as a vbamcore dependency.
Fixes https://github.com/visualboyadvance-m/visualboyadvance-m/issues/542.
2019-10-11 07:02:38 -07:00
orbea 2d783f5df8 cmake: Fix ENABLE_ASAN with clang.
Only -fsanitize=address is needed for asan to work with both
gcc and clang.

[170/196] Building CXX object CMakeFiles/vbamcore.dir/src/Util.cpp.o
clang-9: warning: -lasan: 'linker' input unused [-Wunused-command-line-argument]
[171/196] Linking CXX static library libvbamcore.a
[172/196] Generating cmdtab.cpp, cmdhandlers.h, cmd-evtable.h
[173/196] Generating wxvbam.xrs
[174/196] Generating builtin-xrc.h
samu: job failed: cd /tmp/visualboyadvance-m/build/src/wx && /tmp/visualboyadvance-m/build/bin2c wxvbam.xrs builtin-xrc.h builtin_xrs
==4845==Your application is linked against incompatible ASan runtimes.
samu: subcommand failed
2019-10-10 02:49:07 -07:00
orbea 65c908141c wx: Fix conditional jump on uninitialized value with valgrind.
==15788== Conditional jump or move depends on uninitialised value(s)
==15788==    at 0x5143A2: wxvbamApp::~wxvbamApp() (wxvbam.cpp:682)
==15788==    by 0x5144BB: wxvbamApp::~wxvbamApp() (wxvbam.cpp:676)
==15788==    by 0x739CD22: wxEntryCleanup() (in /usr/lib64/libwx_baseu-3.0.so.0.4.0)
==15788==    by 0x739D02B: wxUninitialize() (in /usr/lib64/libwx_baseu-3.0.so.0.4.0)
==15788==    by 0x739CE39: wxEntry(int&, wchar_t**) (in /usr/lib64/libwx_baseu-3.0.so.0.4.0)
==15788==    by 0x50BD42: main (wxvbam.cpp:32)

v2: Initialize overrides as a nullptr.
2019-10-10 02:47:43 -07:00
orbea 6adf5ea487 wx: Silence -Woverloaded-virtual warnings with debug builds.
The Clone function seem unused, the AcceptsFocus and HasFocus
functions are marked as const and Show is renamed to ShowAddr
to not conflict with unrelated functions.

[187/196] Building CXX object src/wx/CMakeFiles/visualboyadvance-m.dir/viewsupt.cpp.o
In file included from ../src/wx/viewsupt.cpp:1:
../src/wx/viewsupt.h:197:10: warning: 'Viewers::MemView::Show' hides overloaded virtual function [-Woverloaded-virtual]
    void Show(uint32_t addr, bool force_update = false);
         ^
/usr/include/wx-3.0/wx/gtk/window.h:64:18: note: hidden overloaded virtual function 'wxWindow::Show' declared here: different number of parameters (1 vs 2)
    virtual bool Show( bool show = true );
                 ^
In file included from ../src/wx/viewsupt.cpp:1:
../src/wx/viewsupt.h:410:10: warning: 'Viewers::DispCheckBox::AcceptsFocus' hides overloaded virtual function [-Woverloaded-virtual]
    bool AcceptsFocus()
         ^
/usr/include/wx-3.0/wx/window.h:724:18: note: hidden overloaded virtual function 'wxWindowBase::AcceptsFocus' declared here: different qualifiers ('const' vs unqualified)
    virtual bool AcceptsFocus() const { return true; }
                 ^
In file included from ../src/wx/viewsupt.cpp:3:
In file included from ../src/wx/wxvbam.h:14:
In file included from ../src/wx/widgets/wx/joyedit.h:9:
../src/wx/widgets/wx/sdljoy.h:115:14: warning: 'wxSDLJoyEvent::Clone' hides overloaded virtual function [-Woverloaded-virtual]
    wxEvent* Clone();
             ^
/usr/include/wx-3.0/wx/event.h:1569:22: note: hidden overloaded virtual function 'wxCommandEvent::Clone' declared here: different qualifiers ('const' vs unqualified)
    virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
                     ^
In file included from ../src/wx/viewsupt.cpp:3:
../src/wx/wxvbam.h:286:10: warning: 'MainFrame::HasFocus' hides overloaded virtual function [-Woverloaded-virtual]
    bool HasFocus()
         ^
/usr/include/wx-3.0/wx/window.h:715:18: note: hidden overloaded virtual function 'wxWindowBase::HasFocus' declared here: different qualifiers ('const' vs unqualified)
    virtual bool HasFocus() const;
                 ^
4 warnings generated.
2019-10-09 10:32:51 -07:00
orbea 84d24b7d71 cmake: Silence _FORTIFY_SOURCE warnings with debug builds.
[79/196] Building CXX object fex/CMakeFiles/fex.dir/fex/Zlib_Inflater.cpp.o
In file included from ../fex/fex/Zlib_Inflater.cpp:3:
In file included from ../fex/fex/Zlib_Inflater.h:7:
In file included from ../fex/fex/Data_Reader.h:7:
In file included from ../fex/fex/blargg_common.h:8:
In file included from /usr/include/assert.h:35:
/usr/include/features.h:382:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
   ^
1 warning generated.
2019-10-09 08:48:20 -07:00
orbea 675072f025 travis: Test xvfb on xenial and bionic. 2019-10-08 13:27:35 -07:00
orbea 4e9882f24d cmake: Don't install visualboyadvance-m twice on WIN32. 2019-10-08 13:23:44 -07:00
orbea 518c147281 cmake: Use an install target for visualboyadvance-m. 2019-10-07 17:36:27 -07:00
orbea 369da07e7f travis: Test make install. 2019-10-07 17:36:27 -07:00
orbea 3111de5205 travis: Test clang builds. 2019-10-07 11:52:40 -07:00
orbea 6cc00a09fe travis: Clean up. 2019-10-07 11:51:07 -07:00
orbea 65fceab75a travis: Refactor script. 2019-10-07 04:47:57 -07:00
orbea abff89e4fb cmake: Use add_executable when not cross-compiling. 2019-10-07 04:46:20 -07:00
Rafael Kitover 61520df789
Add @orbea to About -> Contributors.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-06 23:48:13 +00:00
Rafael Kitover 7ee3cbe120
Joystick rumble followup. #522
Call `rtcEnableRumble(true);` always regardless of the `rtcEnabled`
option, because @negativeExponent points out that they are unrelated.

Check for at least SDL version `2.0.9` before using the
`SDL_JoystickRumble()` API, since it is not present in earlier versions.

Increase rumble duration to twice the poll time to keep the motors
running, subsequent poll events will cancel the rumble as necessary.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-06 17:42:12 +00:00
Rafael Kitover 4bc9bb84b4
Implement joystick rumble. #522
Call `rtcEnableRumble()` in the core if the rtc is enabled during ROM
loading.

On `systemCartridgeRumble(bool)` events from the core, set the state in
`wxSDLJoy` accordingly, to either rumbling or not rumbling based on the
boolean parameter.

On the `50ms` joystick poll events, use `SDL_JoystickRumble()` to enable
rumble on both the low and high frequencies at maximum for the poll time
of `50ms`, to be set or reset again on the next poll event.

Tested in Drill Dozer, rumbling is being activated. Will need testing
from users as well to see if this is implemented correctly.

Fix #522.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-06 11:06:08 +00:00
Rafael Kitover 5b809e3ad1
Drop reference to ubuntu PPA from README.md
The packages in this PPA are completely out of date, even the
dependencies are out of date.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-06 06:06:13 +00:00
orbea 680af6d420 cmake: Silence cmake policy warning CMP0058.
See: cmake --help-policy CMP0058
2019-10-05 18:33:44 -07:00
Rafael Kitover ec7d1b15b1
cmake: fix reading version from changelog
Fix version regex to allow version numbers without text and revision.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-05 20:32:46 +00:00
Rafael Kitover 699d0c3724
Add denisfa to about -> contributors.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-05 19:35:15 +00:00
Edênis Freindorfer Azevedo 384f448757 Fix key accel overriding menus and dialogs.
All keys were being captured before being processed by any window of the
app to check for accelerators. This meant being impossible to use any
keys for input if they were saved for an accel.

- Fix #516.
2019-10-05 12:30:49 -07:00
Rafael Kitover 6468d04114
appveyor: cache vcpkg build deps
Will hopefully make the build much faster.

TODO: make the vcpkg cmake script update vcpkg.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-04 14:01:43 +00:00
Rafael Kitover 3e22d17fb2
fix Visual Studio build
The change to use an extern version variable in 24d83a12 produces a
linker error with Visual Studio due to the `version.c` source file being
compiled as C instead of C++.

Rename:

`version.c`   -> `version.cpp`
`version_c.h` -> `version_cpp.h`

And update all references accordingly.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-04 13:20:10 +00:00
Rafael Kitover 24d83a1262
make recompile for vers/git state change minimal
Make a `version.c` with `const char*` variables to store the version
strings used by other files, to make recompiles slightly faster when the
git state changes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-04 08:14:22 +00:00
Rafael Kitover af0de1c4b3
xbrz: fix inline asm check
Use correct cpp code to detect x86/amd64 architecture to use inline asm.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-04 07:35:49 +00:00
Rafael Kitover e811070d01
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-04 07:22:44 +00:00
Ar't ced2676926
win: set correct version in rc
xvbam.rc: use version.h to generate version strings,
cmake: adding version in odd format required by rc
2019-10-04 07:13:20 +00:00
Rafael Kitover 09fbcbac07
release v2.1.4
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-10-02 14:17:30 +00:00
Rafael Kitover c93e017d3a
builder: minor changes to support mac 32 bit
Pass `CC="$CC $CFLAGS"` to `make` for `libgsm`, so that the `-m32` is
passed for 32 bit builds.

For `mac_install_core_deps()` make sure brew is installed and install
brew perl, otherwise perl extensions cannot be built on Mojave for 32
bit.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-28 14:29:40 -07:00
Rafael Kitover c1636d1bcf
builder: fixes for ffmpeg + misc.
Use git master for `graphite2` and a better cmake patch, with these
`DIST_ARGS`:

```
-DGRAPHITE2_NFILEFACE=ON -DGRAPHITE2_TESTS=OFF -DGRAPHITE2_DOCS=OFF
```

Use `DIST_CONFIGURE_OVERRIDES` instead of `DIST_ARGS` for `libvpx` and
`ffmpeg` because their configure scripts error on the `--sysconfdir`
arg.

Change all other references to `libvpx` and `ffmpeg` `DIST_ARGS` to use
`DIST_CONFIGURE_OVERRIDES` instead.

Add `-j1` to `xvidcore` `MAKE_ARGS` because it sometimes fails parallel
builds.

Change the `mkdir` commands to `mkdir -p` in `mingw.sh` because
`core.sh` now also makes those directories.

In `mingw.sh` for `libvpx` extra `CFLAGS`, add `-mstackrealign` for 32
bit builds and `-fno-asynchronous-unwind-tables` for 64 bit builds. The
latter is necessary to build, taken from the msys2 `libvpx` mingw
package.

Also add the `stdint.h` `-include` option to `CFLAGS` for libtheora and
ffmpeg because they use the `libogg` headers.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-28 19:07:44 +00:00
ZachBacon aec23e3586 builder: re-enable ffmpeg, update dists
Update the following dists:

bzip2, xz, libiconv, gettext, ninja, meson, libgcrypt, libsecret, sdl2,
flac, libogg, libvorbis, wxwidgets

and the following ffmpeg deps:

graphite2, xvidcore, libgsm, opus, libsoxr, libass, libbluray, libvpx,
libx264, libx265

Enable ffmpeg for vbam again as we now have working recording code
thanks to @denisfa.

Disable graphviz and libzvbi for the time being since we don't really
need them.

For mp3lame use the msys2 patch to remove posix code instead of linking
to catgets.

For libogg and libvorbis on mac, add `-include /path/to/stdint.h` to
`CFLAGS` when building.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-28 01:10:04 -07:00
Edênis Freindorfer Azevedo 806dd7daa6 Fix circular `--config` for SDL port.
When using the command line options, we had a circular issue:
- using `LoadConfig()` before `ReadOpts()` would mean the `--config` is
ignored.
- using `ReadOpts()` before `LoadConfig()` would mean the command line
options were ignored in favor of the default ones.

If we want to use a custom `vbam.ini`, we need to load it with
`--config`. Now we only consider params order on command line.
2019-09-25 20:59:37 -01:00
Edênis Freindorfer Azevedo 1aa8afb4dc Drop dead code entirely.
All this code protected by `#if 0` is implemented already one way or
another. Hence the decision to remove it, instead of commenting.

This also removes the need of the branch `arthur/sdl2`.
2019-09-25 20:59:37 -01:00
Edênis Freindorfer Azevedo 531172c4be Fix displaying of link menu when `ENABLE_LINK=NO`.
We disable the items, but not the menu. So, there was an empty list
on `Options` > `Link` > `Type`.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo 07107096b8 [Windows] Fix crash when setting weekly updates.
It happens due to our wxRadioButtons having 3 options (indexed by 0, 1
and 2) but we trying to get the index 7 (due to want to check every 7
days).

We should still implement something like WinSparkle for Windows.

- Fix #499.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo efa09bdb07 Add faster sqrt code for xBRZ filters.
We use ASM code for Windows `x86` and Linux desktop. The others remains
the same.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo 10f5576ecf Fix config file when removing system accels.
We assign the `NOOP` id for every command disabled by the user, but not
the command name (just `NOOP`). When updating the configuration file,
any command with `NOOP` id is valid, even if the label does not match
`NOOP`. Hence this weird issue.

- Fix #502.
2019-09-16 21:36:44 -01:00
Edênis Freindorfer Azevedo 1c6b016853 [Windows] Fix remaining UTF-8 issues.
We were missing some `wxConvLibc` on the output code. This meant crappy
messages on windows.
2019-09-16 21:36:44 -01:00
Rafael Kitover a2f3126e17
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-14 22:22:00 +00:00