* Remove the wx prefix and make UserInput a class in the config
namespace.
* Make UserInput constexpr-constructible. This should reduce program
startup time by having the compiler pre-allocate UserInput objects.
* Change initialization of UserInput objects to be made via
constructor. A previous approach would have limited creation of
UserInput objects to a few places but that proved unworkable in the
long run.
* Changed the string to enum conversions to be built at runtime from
the existing constant array rather than redefining the strings.
* Fixed an issue in the initialization of the `checkable_mi` array.
A test had been mistakenly removed during the refactor.
* Fixed an issue where changing a bool or int option would cause an
assertion error at runtime. Changed helper methods definitions to
use a pointer to a variable rather than take a parameter by
reference, clarifying the intent from the caller perspective.
* Fixed the `renderer` enum definition to properly exclude Direct3D or
Quartz2D depending on the platform.
* Various comment fixes.
This change introduces a new class to handle all of the INI options
data, VbamOption. A VbamOption represents a single option in the INI
file. It is not constructible outside of its implementation, which
prevents the initialization of incorrectly formatted options.
Internally, a VbamOption points to a global variable in memory, which
holds the value used at runtime. This is because various parts of the
codebase edit the global variable rather than going through a central
registry. This also means we need to separately update the INI values.
In the future, we may be able to convert all existing reads and writes
to the global variable to go through VbamOption. Individual UX elements
could link directly to getters/setters for a specific VbamOption rather
than have duplicate data.
VbamOption replaces the opt_desc struct and the global opts array. All
users of opt_desc and the global opts array have been updated.
This is a necessary preliminary change to better support a refactor of
accelerators, through wxUserInput.
Issue: #745, #158
Add default menu accelerator `CTRL+I` to `ChangeIFB` which is the menu
item to change the interframe blending algorithm.
CMD+I on macOS.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When changing the interframe blending algorithm via:
`Options -> Video -> Change interframe blending`
, show the short name of the algorithm instead of the list number in the
OSD.
Store a pointer to the wxChoice of interframe algorithms read from the
XRC for easy access.
Shorten the names of the algorithms in the XRC selection list.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use namespace strutils:: instead of the `str_` prefix for the functions.
Remove `vec_find` as it's just an alias for `wxArrayString::Index(str)`
and is not a function on a string.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>