Commit Graph

2869 Commits

Author SHA1 Message Date
Rafael Kitover 8e83209121
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-06 02:02:22 +00:00
Rafael Kitover 13c558ac9f
Disable wireless link type
Always disable wireless link type as it has never worked.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-04 03:17:35 +00:00
Fabrice de Gans 3eb9fbdb7e [snap] Fix snapcraft build for core20 2022-09-03 19:01:17 -04:00
Rafael Kitover e140ba816c
installdeps: remove wxgtk2 for Arch on failure
The wxgtk2 package being installed may prevent the installation of the
newer wxwidgets-gtk3 package, remove it on pacman failure and try again.

See:

https://archlinux.org/news/wxwidgets-32-update-may-need-manual-intervention/

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-03 09:34:05 +00:00
Squall Leonhart 355c8efeb4 change invite code
resolves expired code error
2022-09-02 17:57:38 -04:00
Squall Leonhart 7d606f7065 fix it better 2022-09-02 17:47:42 -04:00
Squall Leonhart ec90072c28 Fix discord link 2022-09-02 17:47:42 -04:00
Rafael Kitover 0fd1daae54
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-27 02:02:26 +00:00
Rafael Kitover 913db72d12
build: check that -mtune=znver3 is supported
On gcc/clang check that the -mtune=znver3 compiler flag is supported, on
Debian 11 it is not and this breaks everything.

If it is not supported fallback to znver2, znver1, skylake-avx512 then
skylake in that order.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-26 17:12:09 +00:00
Rafael Kitover 2da9696a50
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-26 02:02:22 +00:00
Rafael Kitover b1c7476f2c
build: update finding vcpkg wxWidgets for 3.2
Use a glob instead of hardcoding '31' in lib name.

Fix #992.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-26 00:59:38 +00:00
Rafael Kitover cf57af4a83
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-25 02:02:21 +00:00
Rafael Kitover e0ae114f2e
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-24 02:02:25 +00:00
Rafael Kitover 6b8b6b6450
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-23 02:02:24 +00:00
Rafael Kitover 7f1d49d3d0
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-21 23:23:23 +00:00
Rafael Kitover 9bda107d3c
build: update dev msg for translations .pot update
In the warning for detected translations source .pot changes, state that
the .pot will be automatically pushed to Transifex, instead of asking
the developer to do that, as they may not have access or the utilities.

The Transifex pull job has been updated to do this.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-18 15:00:40 +00:00
Rafael Kitover dd10b8075f
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-18 14:53:25 +00:00
Rafael Kitover 2d5fdf8e79
translations: rebuild source .pot
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-18 14:46:00 +00:00
Rafael Kitover f68492cbbf
build: fix deps from/to translations source .pot
Make the wxvbam.pot output a top-level build target and the check and
warning message for developers a POST_BUILD command for it.

Broken by 60caad86.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-18 14:31:19 +00:00
Rafael Kitover 639003a8b6
Show pixel filter name not number on cycle
Save the wxChoice* for the pixel filter name selection list in the XRC
and use it to display the filter name in the status message on pixel
filter cycle instead of the filter number.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-18 13:52:13 +00:00
Rafael Kitover a3b2a35395
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-18 11:49:19 +00:00
Rafael Kitover 60caad8666
build: improve translations.zip creation
Make translations.zip a dependency of the app and remove it as a
dependency of other commands/targets that do not use it as a source.

Silence the very spammy output of the zip program.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-10 15:29:20 +00:00
Rafael Kitover a87a6a2cc1
refactor: add static GetX11Display() in panel.cpp
Add static GetX11Display() function to get the app X11 Display* instead
of making the GDK/GTK calls in two places.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-10 13:31:22 +00:00
Rafael Kitover 236cffb42b
Make another adjustment to glXQueryExtensions
Use GDK/GTK to get the X display instead of glXGetCurrentDisplay().

For #985.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-09 22:27:07 +00:00
Rafael Kitover 643ec0f7b6
Pass DefaultScreen(display) to glXQueryExtensions
Pass DefaultScreen(display) as the screen number to
glXQueryExtensionsString(display, screen), this may work more reliably
for some configurations than always assuming screen 0.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-09 14:45:11 +00:00
Rafael Kitover 395ed0eb2a
build: fix tests build on Linux by doctest update
Update doctest.h because the old version causes build failures on Linux.

Also move it from third_party/include/doctest to third_party/include.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-09 14:18:40 +00:00
Fabrice de Gans 50a1391232 Simplify Hat handling
* Parse the hat bitfield directly rather than going through an
  intermediate enum state.
* Clean up some of the sdljoy code to use less vertical space.
2022-08-09 11:00:34 +00:00
Fabrice de Gans a56ea0225a Revamp wxJoyEvent to simplify handling of joystick events
Previously, wxJoyEvent surfaced the internal state of the joystick
changes, forcing consumers of this class to convert the values to the
mod and key values used in the rest of the code base. This streamlines
the wxJoyEvent API so the events sent to the consumers can be used
as-is. In particular, this allows us to remove manual generation of
"ghost" events in GameArea.

Breaking change: This has the side effect of disabling setting
diagonals from a joystick HAT as a discrete control. However, this only
ever worked with game controllers not compatible with the newer SDL
GameController API, since it handles HATs as 4 discrete buttons. For
compatibility purposes, these have been moved 1/8 turn
counter-clockwise - i.e. NE is now N.

Issue: #745
2022-08-09 11:00:34 +00:00
laqieer 60d7ead565
Fix menu state after playing a movie
Fix the state of the File -> Play -> Start/Stop menu after playing a
movie by calling systemStopGamePlayback() when the playback stops.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-08 04:01:45 +00:00
laqieer d2fee771fd
Add VBA Movie Version 2
Add new format for recording VBA Movies that records inputs since the
time of the last input instead of the beginning of the movie.

Keep the extension `.vmv` the same, the format is determined from the
header of the file.

Make this the new default format for recording VBA Movies.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-08 04:01:45 +00:00
Rafael Kitover 5008ffbacf
Stop using MINGW64 windres rc compiler for CLANG64
On MSYS2, stop using the MINGW64 windres.exe Windows resource file
compiler instead of the CLANG64 provided one, because the CLANG64
windres.exe works correctly now, while using the MINGW64 windres.exe no
longer works.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-07 21:13:52 +00:00
Rafael Kitover e29032d48a
Switch to nonstd::optional due to mac build issues
Switch usage of std::optional to nonstd::optional for now because of an
error from the Mac builder script, I cannot reproduce the problem yet
but will try to fix it later, it may not be fixable when targeting 10.7.

The header is from:

https://github.com/martinmoene/optional-lite
.

Usage is about the same, to include:

`#include "nonstd/optional.hpp"`

Then use nonstd::optional and nonstd::nullopt instead of the std::
counterparts.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-06 12:59:10 +00:00
noabody fb99a07625 error typedef Status fix for #904 2022-08-06 12:19:45 +03:00
Fabrice de Gans 51473a7c53 Refactor game controls bindings
This introduces abstractions for a game key (`wxGameKey`), a game
control (`wxGameControl`) and a common global handler for in-game
user input processing (`wxGameControlState`).
User configuration is changed from a vector to a map of `wxGameControl`
to a set of `wxUserInput`, which simplifies input configuration updates.

User input processing for in-game controls is now unified between
keyboard and joypad input, and is much faster in general since access
to game control state is now always logarithmic rather than linear.
This comes at the expense of slightly slower user input configuration
updates. However, in the worst case scenario, this is still done in
O(log(n)).

This removes all uses of `wxJoyKeyBinding`. However, some uses of the
key, mod, joy triplets remain and will be cleaned up in follow-up PRs.

Issue: #745
2022-08-06 12:18:35 +03:00
Fabrice de Gans 3f2d3c139d Remove manual joystick polling
Previously, a manual polling of every joystick was performed every 25ms,
resulting in many CPU resources being wasted. This seems to have been
put in place to deal with issues in SDL where joysticks connected after
SDL was initialized did not fire SDL events properly. From manual
testing, this issue seems to have been fixed.

This also fixes a bug in handling of legacy joystick hats, where an
incorrect conversion for the event value was performed.

Finally, this fixes minor typoes and renames
`wxSDLJoyState::ProcessEvent()` to `wxSDLJoyState::ProcessSDLEvent()` to
suppress a warning about a method override.
2022-08-06 12:17:35 +03:00
Rafael Kitover 1cfe275012
doc: add Discord/IRC links to README.md
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-07-25 07:12:24 +00:00
Fabrice de Gans 4aebd0b802 Introduce wxUserInput class
This introduces a new abstraction for any user input. The long-term goal
is to replace every usage of "custom" {key, mod, joy} triplets in the
code base with this new class.

This class implements comparison operators, allowing for faster access
in a set or as a key in a map, compared to the vectors currently used.

Issue: #745
2022-07-12 18:20:09 +00:00
Colton G. Rushton d7abc27438
doc: remove travis and appveyor from README.md
We are using GitHub actions now.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-07-06 23:34:33 +00:00
Deen O'Connor 76bf554161
installdeps: use correct package name for libsdl2
The actual package name for libsdl2 is libsdl2-2.0-0 not libsdl2-2.0 in
Debian/Ubuntu and probably others, and this only worked by accident
due to apt doing a regex search for packages.

Get the correct package for the latest version of libsdl2 from
apt-cache.

Also fix the other lib package searches via apt-cache to return the
latest version.

Resolve #882.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-07-04 19:32:09 +00:00
Fabrice de Gans-Riberi f132e15511 Abstract player_index into wxJoystick
* Add wxJoystick to abstract what was previously referred to as
  |player_index|. This is a first step towards a larger refactor of
  input handling.
* Remove "SDL" from types that are not directly SDL-related, namely
  "wxSDLJoyEvent", "wxSDLControl".
* Rename "wxSDLJoy" into "wxJoyPoller". This clarifies the use of this
  class.

Issue: #745
2022-07-04 13:58:28 +03:00
Rafael Kitover 37dc95b930
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-06-16 21:02:11 +00:00
Rafael Kitover 941eef918b
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-06-15 21:02:08 +00:00
Rafael Kitover 94627c1e8e
build: link pcre2 with vcpkg wxwidgets
wxregex uses pcre2, link it when using static vcpkg wxwidgets.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-06-15 20:52:29 +00:00
Rafael Kitover 3e224bab40
build: enable ccache for MSVC
ccache supports MSVC now, so don't disable it for MSVC builds.

Remove the global RULE_LAUNCH_COMPILE property because it breaks
resource compilation on MSVC and just use CMAKE_CXX_COMPILER_LAUNCHER
etc..

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-06-15 01:00:13 +00:00
Squall Leonhart 72d772189a Add before creating request to feature.yml
and encourage searching
2022-06-05 02:10:54 -04:00
Zach Bacon a413eb048c
switch from wxmsw3.1 to wxWidgets 3.0 and pkg-config to pkgconf
Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
2022-06-05 01:22:24 -04:00
Zach Bacon fed8c3697e
Yeah... one last tweak to get submodules pulled
Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
2022-06-05 01:08:34 -04:00
Zach Bacon 3abf084f2f
last tweak to the CI build system
at least till clang is fixed for windows targets

Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
2022-06-05 00:57:20 -04:00
Zach Bacon 05e58ba0a7 update the workflow script 2022-06-05 00:49:02 -04:00
Rafael Kitover c9994c284a
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-06-03 21:02:14 +00:00