Commit Graph

3212 Commits

Author SHA1 Message Date
twinaphex 26e9a6e3d9 (iOS/tvOS) fix building for iOS; add tvOS support 2020-10-10 03:23:59 +02:00
twinaphex dc9422c479 if not defined, define it 2020-10-08 05:41:56 +02:00
twinaphex 7b3c721f64 Add .gitlab-ci.yml 2020-10-08 05:35:51 +02:00
Rafael Kitover 0ddd50273c
Fix mxe apt repo selection.
Default to latest, which is bionic, for earlier repositories, match all
intermediate release code names.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-29 21:51:32 +00:00
Rafael Kitover 13854135a9
Write CFBundleShortVersionString to Info.plist.
CFBundleVersion is already being written since denisfa's Sparkle
changes.

- Fix #750.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-29 14:13:26 -07:00
Joseph Griego 65a67f219a Don't set wx-config prefix from CMAKE_PREFIX_PATH
I'm not sure what purpose this currently serves but I know that it
breaks the build when CMAKE_PREFIX_PATH is set to something nontrivial.
Stop doing that.
2020-09-28 23:25:19 +00:00
Rafael Kitover 890f560553
Switch to C++17 for GUI.
Adjust compiler flags to use `-std=gnu++17` for gcc/clang instead of
`-std=gnu++11` and `/std:c++17` for msvc.

Remove Ubuntu trusty job from travis (it's too old.)

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-28 12:09:54 +00:00
Rafael Kitover cb0933bf44
Stop changing plane ptrs in rec. audio frames.
Stop setting the 4 plane data pointers in recording audio frames to the
sample stream. This confuses the converter and makes it write the right
channel to both channels.

- Fix #723.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-28 01:33:58 +00:00
Rafael Kitover 98b2fb6ebb
Fix finding wxWidgets on Gentoo.
Prefer the `wx-config` from PATH on Gentoo, because that points to the
eselected wxWidgets build.

This is already done for Win32 builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-24 01:33:45 +00:00
Brian Searls 80634683b1 Force a panel update when configuring bilinear.
- Fix #727
2020-09-05 21:45:17 +00:00
Rafael Kitover 87fac44fdb
Transifex push/pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-05 19:39:52 +00:00
Rafael Kitover 6a7142813d Differentiate between SDL joy index/instance_id.
Hopefully fix various bugs caused by not differentiating between SDL
joystick_index and SDL_JoystickID (the joystick instance id.)

On controller disconnect, disconnect and reconnect all configured
devices because the SDL joystick index may change, and this will update
the mapping.

Also fix creating a state entry for the configured joystick even when
it's not connected, add the controller/joystick name to the connected
message and increase the poll time from 10ms to 25ms.

- Fix #718.
- Fix #726.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-05 19:06:48 +00:00
Rafael Kitover 11693d8381
Clean up GB MBC30 check.
Based on feedback from @negativeExponent.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-04 17:33:25 +00:00
Rafael Kitover 2727f683f1
Support archlinux derivatives in installdeps.
Assume an archlinux-like distribution based on the existence of
`/usr/bin/pacman` as the last test.

- Fix #710.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-03 16:31:25 +00:00
Rafael Kitover 020daad85f
Fix joy accels when emulation is paused.
Start the joystick polling timer on pause and stop it on resume, so that
accelerators bound to joystick events are still processed.

Followup on def5d3e4.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-09-02 00:50:45 +00:00
Rafael Kitover def5d3e486
Stop timer when game is loaded again.
Followup on 7031c1d1, which for some reason removed the calls to stop
the timer when a game is loaded and restart it when it is unloaded.

Add the calls back.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-31 07:25:38 +00:00
Rafael Kitover 9dd2932436
Disable nostl build on travis as well for now.
It is failing in the same way as the utf8 build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-29 23:25:21 +00:00
Rafael Kitover 12193dcbae
Disable utf8 build on travis for now.
To be fixed later.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-29 22:23:21 +00:00
Rafael Kitover e59cedaed6
Transifex push/pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-29 21:42:57 +00:00
Rafael Kitover 546c9d3a11 Minor joystick event handler finding refactor.
Remove the `evthandler` member and `Attach()` method from `wxSDLJoy`.

Add the `GetJoyEventHandler()` method to `MainFrame`, which returns the
window in focus, or the panel if the option for joystick background
input is enabled.

Remove the handler parameter in `wxSDLJoy::CreateAndSendEvent()` and
call `wxGetApp().frame->GetJoyEventHandler()` to get the handler.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-29 20:53:49 +00:00
Rafael Kitover 891b1c35e4 Update gettext source.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-29 20:53:49 +00:00
Edênis Freindorfer Azevedo e0816b0e10 Fix weird input/buttons memory leak.
Deleting the vector was not enough, although it was not clear what else
was causing the leak.
2020-08-29 20:53:49 +00:00
Edênis Freindorfer Azevedo cc5ddd1bb7 Isolate x11 keymap to its own header. 2020-08-29 20:53:49 +00:00
Edênis Freindorfer Azevedo 790628961d Include X11 libs and header without screensaver.
We need to always include these files and libs now due to using them
on our keyboard background input solution.
2020-08-29 20:53:49 +00:00
Edênis Freindorfer Azevedo 7031c1d155 [LINUX,WINDOWS] Key/Joy background input.
- Joystick background input.

Set as enabled by default.

- Linux: `X11` and `Wayland` done.

1. `Wayland` does not allow to listen for keypresses for security reasons.

Discussion here: https://github.com/albertlauncher/albert/issues/309

2. For `X11` we can use `XQueryKeymap` to check keyboard state.

- Windows: done.

We use `GetAsyncKeyState` most significant bit to check if the key
is being pressed.
2020-08-29 20:53:49 +00:00
Edênis Freindorfer Azevedo 84f3e8ce67 Allow joystick background input.
Refactor function to send joy events to `GameArea` even if vbam is not
focused.
2020-08-29 20:53:49 +00:00
Rafael Kitover bce91d1722
Run wxrc from the source dir.
Followup on ff03bcc1.

Running wxrc from the build directory turned out to be unnecessary,
because the dlls were not there anyway, and we added them to the PATH.

And using absolute paths for the xrc sources puts them into the gettext
pot comments which is not what we want.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-29 19:44:15 +00:00
Fabrice de Gans-Riberi 4074158061
Add GUI cmd line option for config file. (#724)
This adds the command-line option `-c` or `--config` to specify a custom
configuration file.

Co-authored-by: Fabrice de Gans-Riberi <steelskin+github@gmail.com>
2020-08-28 22:26:07 +00:00
Rafael Kitover a305f550e1
Replace Catch2 with doctest for unit tests.
Pretty much the same usage and functionality.

Add `tests.hpp` to configure doctest.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-28 05:14:22 +00:00
Rafael Kitover 22a3524c66
Fix linking on Msys2.
Do not link `SDL2main` on any WIN32, not just MSVC.

Define `WIN32_CONSOLE_APP` for Debug mode builds on any WIN32, not just
MSVC.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-28 05:09:58 +00:00
Rafael Kitover e2634df5cc
Update .gitignore.
Remove generated files that are now written to the build dir instead.

Match any build directory from root.

Stop listing submodule and vcpkg.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-28 04:57:35 +00:00
Rafael Kitover 5081ae44e5
Vcpkg fixes.
Fix vcpkg upgrades to work with the current vcpkg master.

When upgrading zlib, remove all optional deps first, because everything
depends on zlib and this can overrun the appveyor 1hr time limit.

Make SFML an optional dep too, like ffmpeg.

Reduce the vcpkg install time limit to 20 minutes, otherwise it may try
to build wxWidgets and ffmpeg and overrun the 1hr time limit.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-26 10:07:04 +00:00
Rafael Kitover 3ee26c0de6
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-25 01:58:41 +00:00
Rafael Kitover 9c8604c58c
installdeps: Move git mod checkout after git inst.
Make sure git is part of the base package list for Win32 builds.

Move the `git submodule update` out of `check_cross()` and into the
Win32 build sections.

Allow it to fail, in case the user is not using a git clone, the cmake
checks will produce an error if the subtree does not exist.

This fixes the problem with the git submodule update failing because git
is not installed yet.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-23 06:13:46 +00:00
Rafael Kitover ff03bcc1e0
Better fix for wxrc with vcpkg.
When doing a dynamic build, the wxWidgets dlls are needed by the wxrc
executable.

Invoke wxrc with the target triplet debug and release bin directory
prepended to the PATH, this is where the dlls are.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-23 05:56:32 +00:00
Rafael Kitover f07a838883
Another hack to work-around broken vcpkg upgrades.
Add a function to check if libogg is installed but libvorbis isn't, this
means it failed to upgrade libvorbis because libogg wasn't upgraded to
the newest port revision supporting pkg-config, see:

https://github.com/microsoft/vcpkg/issues/13037

In this case, remove libogg recursively and allow the install action to
reinstall SFML and all deps.

This will also fix building link support on appveyor for the time being.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-22 21:31:12 +00:00
Rafael Kitover c169420fbc Turbo/throttle config and DirectSound fixes.
Make `speedup_frame_skip` and `speedup_throttle` independent settings,
with `speedup_frame_skip == 0` when `speedup_throttle` is not in effect,
and `speedup_throttle == 100` when `speedup_frame_skip` is in effect.

This fixes a previously introduced bug where `speedup == true &&
speedup_frame_skip = X` was never enabled.

This also allows `speedup_throttle == 0` for no throttle and no frame
skip during speedup.

Also set the upper bound on `throttle` and `speedup_throttle` to `450`
instead of `600`, as the DirectSound driver does not support values
higher than that.

In the DirectSound implementation of `setThrottle`, for `throttle == 0`
use a `throttle == 450` frequency multiplier, because a zero frequency
does nothing.

- Fix #719.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-22 20:25:05 +00:00
Rafael Kitover 5114c1dc87
Remove el_GR translation, leaving el translation.
The el_GR, Greek (Greece) translation is empty, while the el, Greek,
translation is 92% done.

Remove el_GR from git and from transifex.

- Fix #721.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-22 20:11:09 +00:00
Rafael Kitover 8603c879a9
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-22 19:41:39 +00:00
Rafael Kitover 4148080eb5
Always update Win32 dependencies git submodule.
Instead of just checking if the submodule has been cloned, always update
it when cmake runs if git is available.

This fixes the problem of users' dependencies submodule clone never
getting updated with new changes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-21 07:03:35 +00:00
Rafael Kitover 84d406ac0e
Temporary fix for wxrc on MSVC/vcpkg builds.
When the wxrc installed by vcpkg into tools was made with the non-static
wxWidgets, and the build is static, it will not find the wxWidgets dlls
and fail.

Use our own wxrc.exe from the dependencies submodule for the time being.

This is a temporary fix, a proper fix would be adding the dlls, if they
are installed, to the PATH.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-20 23:28:42 +00:00
Rafael Kitover 378c9493e9
Fix joystick config when game is loaded.
Rename the joystick polling timer accessors and add a predicate.

Check it and make sure the timer is running in the input and accelerator
config dialogs.

- Fix #711.
- Fix #716.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-19 11:32:38 +00:00
Rafael Kitover 61a726a828
Merge remote-tracking branch 'libretro/master'
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-19 10:57:35 +00:00
Rafael Kitover dcaa18aae4
Fix optional deps in vcpkg script.
Before installing optional deps, check that the associated variable is
either unset or true.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-19 09:59:29 +00:00
Rafael Kitover 3052eb33a5
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-19 09:42:02 +00:00
Autechre 36b011c72e
Merge pull request #92 from negativeExponent/gb_update
Gb update
2020-08-18 16:28:06 +02:00
negativeExponent 95213a6d55 GB: Only use mapperLastTime to see if RTC data was loaded
- Removing mapperSeconds and mapperLSeconds since both of these can be
  zero at any time since they are seconds timer, not seconds since
epoch.
- This leaves only mapperLastTime as this is the number of seconds since
  last epoch. If this value is zero, then initialize rtc.
2020-08-18 21:14:21 +08:00
Rafael Kitover fb9e7e2059
Fix expat lib name for vcpkg.
It is now installed as `libexpatMD.lib` for release and
`libexpatdMD.lib` for debug and not `expat.lib`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-17 22:05:01 +00:00
Rafael Kitover 375daf99cb
Only build ffmpeg with vcpkg if installs < 30m.
Fix the problem with vcpkg installs including both wxWidgets and ffmpeg
overrunning the one hour time limit, by making ffmpeg optional and only
building it if the other builds are under 30 minutes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-17 18:38:58 +00:00
Rafael Kitover dfec0b3d99
Transifex push/pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-17 18:37:36 +00:00