This reverts commit 1ac7ac999b.
The %% sequence turned out to not be dealt with specially by gettext
tools.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a few translation markers for strings that are translated in the
wxWidgets catalogs, which we do not pull yet.
Also change the string "% of normal:" to "percent of normal:" because
the percent sign was causing an error in poedit.
Fix#1029.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Add convenience direct accessors to individual Options.
* Move BasicOptionObserver to a separate header and allow it to
observer multiple options. This also removes the include for
"config/option.h" for using this observer, reducing build time.
* Never skip the "Plugin" option when changing filters. This is
already handled properly in the GameArea class. If the plugin is
unusable, GameArea resets the filter to the default value.
* Make the OptionID names slightly less long and fix the inconsistent
naming in the enum.
This adds a generic Observer interface to config::Option. To
demonstrate its intended usage, the Display Configuration dialog and
the options it controls have been updated to be entirely handled via
the config::Option class.
Implementations for wxValidator are used to validate the flow between
the UI and the underlying Option. In turn, modifying the Option value
triggers all of its observers that should then do what they need to
do.
Rather than explicitly calling all of the needed methods after
modifying a global option value, the UI elements that need to be
notified when an Option value is modified will be notified via their
observers. Runtime assert checks are put in place to prevent infinite
recursion if an observer attempts to modify an Option while handling
the observer callback.
Once all uses of Options have been updated, we should get into a state
where the following will be true:
* cmdevents.cpp will no longer rely on the application state.
* All dialogs will have been moved to specific implementations,
reducing the size of guiinit.cpp
* update_opts() will no longer need to be called and will be removed.
This will then make it easier to update accelerator handling to be
done with config::UserInput.
Bug: #745
Add support for `eglSwapInterval()` to enable or disable VSync on
Wayland.
Also add status messages for enabling or disabling VSync, for both EGL
and GLX.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
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
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>
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>