Commit Graph

2457 Commits

Author SHA1 Message Date
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
Rafael Kitover 1e9d167597
builder: pause before codesigning for win targets
Pause before `pass` asks for the `gpg` passphrase to retrieve the
password to unlock the windows codesigning certificate.

This is so that the user does not have `gpg` time out waiting for the
passphrase.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-14 21:46:01 +00:00
Rafael Kitover 0af5965ee1
builder: work on linux static binary
Merging some work I was doing on trying to make a working mostly static
linux binary a year ago, with some additional minor refactoring.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 16:42:43 +00:00
Rafael Kitover 33c43e3ad4
add -p:BuildInParallel=true to appveyor.yml
Hopefully this will speed up the appveyor builds at least a little bit.

We really need to switch to ninja at some point though.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 16:02:06 +00:00
Rafael Kitover 61141ebd3a
add -p:BuildInParallel=true to VS instructions
Add `-p:BuildInParallel=true` to the Visual Studio instructions for
`msbuild`, to build subprojects in parallel, without which the `-m`
option has no effect, both must be used.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:12:15 +00:00
Rafael Kitover 9ee6b54a68
cmake: remove invalid opt /std:c++11 for MSVC
Visual Studio 2017 only allows `/std:c++14` and higher, so remove the
`/std:c++11` option, we'll take the default of C++14 standard.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:04:20 +00:00
Rafael Kitover 0f2c8cab08
win: check APPDATA if LOCALAPPDATA is not found
Check for the APPDATA environment variable if there is no LOCALAPPDATA
environment variable for things like reading the config file.

Fix #407.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:01:16 +00:00
Rafael Kitover 32fbfec46c
transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-10 23:26:00 +00:00
Edênis Freindorfer Azevedo cc51622928 transifex push/pull
Signed-off-by: Edênis Freindorfer Azevedo <edenisfa@gmail.com>
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 528c37f9e0 Allow "Browse" to be translated.
wxWidgets fails to translate some internal strings due to locale issues.

It is not clear how the current locale is detected, but it fails for
cases when the system is different from the set by the user. Eg: the
system is using `en_US`, but the user sets `LANG=pt_BR.utf8` for an
application. Some internal strings are translated because of `LANG`,
while others remain the same because `en_US`.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo d8c981fb42 Fix toggles for video/audio layer options on menu.
We could not use key shortcuts for this, since it was only checking if
the option was activated on menu. This only happens if you open the
menu and click it, so the key shortcut does not work.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo c0f96425e6 Show all commands available on menu.
We move from `Other commands` to several places of our main menu. This
way we allow texts to be translated and easier view of them for users.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 51fa150f1c Adjust MMX menu variable and position.
It should only appear on `x86`.
2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 27b038b378 Show messages about operations of state slot. 2019-09-10 07:59:56 +00:00
Edênis Freindorfer Azevedo 2e24845711 Allow translation of the words `Open` and `Quit`. 2019-09-10 07:59:56 +00:00