The static lib is now called `SDL2-static.lib` and the debug version is
called `SDL2-staticd.lib`.
Adjust our `cmake/FindSDL2.cmake` for the new vcpkg naming convention.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove constexpr in user-input.h as LLVM 13 complains that it is
illegal.
Use variant-lite as nonstd::variant and related types as some variant
functions are macOS 10.14 Mojave only.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* 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>