mirror of
https://github.com/visualboyadvance-m/visualboyadvance-m
synced 2025-10-05 23:52:49 +02:00
Compare commits
1 Commits
bd20c79013
...
msw-dark-m
Author | SHA1 | Date | |
---|---|---|---|
|
08665c36c6 |
File diff suppressed because it is too large
Load Diff
@@ -348,6 +348,7 @@ std::array<Option, kNbOptions>& Option::All() {
|
||||
Option(OptionID::kUIAllowJoystickBackgroundInput, &g_owned_opts.allow_joystick_background_input),
|
||||
Option(OptionID::kUIHideMenuBar, &gopts.hide_menu_bar),
|
||||
Option(OptionID::kUISuspendScreenSaver, &gopts.suspend_screensaver),
|
||||
Option(OptionID::kUIForceDarkMode, &gopts.force_dark_mode),
|
||||
|
||||
/// Sound
|
||||
Option(OptionID::kSoundAudioAPI, &gopts.audio_api),
|
||||
|
@@ -116,6 +116,7 @@ enum class OptionID {
|
||||
kUIAllowJoystickBackgroundInput,
|
||||
kUIHideMenuBar,
|
||||
kUISuspendScreenSaver,
|
||||
kUIForceDarkMode,
|
||||
|
||||
/// Sound
|
||||
kSoundAudioAPI,
|
||||
|
@@ -120,6 +120,7 @@ static constexpr std::array<Option::Type, kNbOptions> kOptionsTypes = {
|
||||
/*kUIAllowJoystickBackgroundInput*/ Option::Type::kBool,
|
||||
/*kUIHideMenuBar*/ Option::Type::kBool,
|
||||
/*kUISuspendScreenSaver*/ Option::Type::kBool,
|
||||
/*kUIForceDarkMode*/ Option::Type::kBool,
|
||||
|
||||
/// Sound
|
||||
/*kSoundAudioAPI*/ Option::Type::kAudioApi,
|
||||
|
@@ -2622,6 +2622,7 @@ bool MainFrame::BindControls()
|
||||
cb->Hide();
|
||||
#endif // !HAVE_XSS
|
||||
}
|
||||
{ getcbb("ForceDarkMode", gopts.force_dark_mode); }
|
||||
wxFilePickerCtrl* fp;
|
||||
#define getfp(n, o, l) \
|
||||
do { \
|
||||
|
@@ -72,6 +72,7 @@ extern struct opts_t {
|
||||
/// UI Config
|
||||
bool hide_menu_bar = true;
|
||||
bool suspend_screensaver = false;
|
||||
bool force_dark_mode = false;
|
||||
|
||||
/// wxWindows
|
||||
// wxWidgets-generated options (opaque)
|
||||
|
@@ -374,7 +374,7 @@ bool wxvbamApp::OnInit() {
|
||||
}
|
||||
|
||||
wxSetWorkingDirectory(cwd);
|
||||
|
||||
|
||||
if (!config_file_.IsOk()) {
|
||||
// Set up the default configuration file.
|
||||
// This needs to be in a subdir to support other config as well.
|
||||
@@ -434,6 +434,11 @@ bool wxvbamApp::OnInit() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && wxCHECK_VERSION(3, 2, 3)
|
||||
if (wxSystemAppearance::IsSystemDark())
|
||||
MSWEnableDarkMode();
|
||||
#endif
|
||||
|
||||
// process command-line options
|
||||
for (size_t i = 0; i < pending_optset.size(); i++) {
|
||||
auto parts = strutils::split(pending_optset[i], wxT('='));
|
||||
|
@@ -18,6 +18,13 @@
|
||||
<flag>wxALL</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxCheckBox" name="ForceDarkMode">
|
||||
<label>Force Dark Mode (requires restart)</label>
|
||||
</object>
|
||||
<flag>wxALL</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
|
Reference in New Issue
Block a user