mirror of
https://github.com/stenzek/duckstation.git
synced 2026-07-11 01:24:11 +02:00
FullscreenUI: Add start-in-big-picture-mode option
This commit is contained in:
@@ -2364,6 +2364,9 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
||||
DrawToggleSetting(bsi, FSUI_ICONVSTR(ICON_FA_GAMEPAD, "Pause On Controller Disconnection"),
|
||||
FSUI_VSTR("Pauses the emulator when a controller with bindings is disconnected."), "Main",
|
||||
"PauseOnControllerDisconnection", false);
|
||||
DrawToggleSetting(bsi, FSUI_ICONVSTR(ICON_FA_TV, "Start In Big Picture Mode"),
|
||||
FSUI_VSTR("Starts the application in Big Picture Mode instead of the desktop interface."), "Main",
|
||||
"StartFullscreenUI", false);
|
||||
DrawToggleSetting(bsi, FSUI_ICONVSTR(ICON_FA_CIRCLE_USER, "Enable Discord Presence"),
|
||||
FSUI_VSTR("Shows the game you are currently playing as part of your profile in Discord."), "Main",
|
||||
"EnableDiscordPresence", false);
|
||||
|
||||
@@ -778,8 +778,10 @@ TRANSLATE_NOOP("FullscreenUI", "Start Download");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Start File");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Start Fullscreen");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Start Game");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Start In Big Picture Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Start a game from a disc in your PC's DVD drive.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Start the console without any disc inserted.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Starts the application in Big Picture Mode instead of the desktop interface.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Stores the current settings to a controller preset.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Stretch Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Summary");
|
||||
|
||||
@@ -1138,6 +1138,7 @@ void System::SetDefaultSettings(SettingsInterface& si, bool ignore_user_prefs)
|
||||
|
||||
si.SetBoolValue("Main", "StartPaused", false);
|
||||
si.SetBoolValue("Main", "StartFullscreen", false);
|
||||
si.SetBoolValue("Main", "StartFullscreenUI", false);
|
||||
|
||||
Settings::SetDefaultLogConfig(si);
|
||||
|
||||
|
||||
@@ -90,6 +90,8 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
|
||||
if (!m_dialog->isPerGameSettings())
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.startFullscreenUI, "Main", "StartFullscreenUI", false);
|
||||
|
||||
setupThemeCombo(m_ui.theme);
|
||||
setupLanguageCombo(m_ui.language);
|
||||
connect(m_ui.language, &QComboBox::currentIndexChanged, this, &InterfaceSettingsWidget::onLanguageChanged);
|
||||
@@ -132,6 +134,11 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
}
|
||||
else
|
||||
{
|
||||
// I hate you so much qtwidgets
|
||||
QtUtils::SafeDeleteWidget(m_ui.startFullscreenUI);
|
||||
m_ui.behaviorLayout->removeWidget(m_ui.enableDiscordPresence);
|
||||
m_ui.behaviorLayout->addWidget(m_ui.enableDiscordPresence, m_ui.behaviorLayout->rowCount() - 1, 0);
|
||||
|
||||
QtUtils::SafeDeleteWidget(m_ui.languageLabel);
|
||||
QtUtils::SafeDeleteWidget(m_ui.language);
|
||||
QtUtils::SafeDeleteWidget(m_ui.themeLabel);
|
||||
@@ -167,6 +174,8 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
dialog->registerWidgetHelp(m_ui.pauseOnControllerDisconnection, tr("Pause On Controller Disconnection"),
|
||||
tr("Unchecked"),
|
||||
tr("Pauses the emulator when a controller with bindings is disconnected."));
|
||||
dialog->registerWidgetHelp(m_ui.startFullscreenUI, tr("Start In Big Picture Mode"), tr("Unchecked"),
|
||||
tr("Starts the application in Big Picture Mode instead of the desktop interface."));
|
||||
dialog->registerWidgetHelp(m_ui.enableDiscordPresence, tr("Enable Discord Presence"), tr("Unchecked"),
|
||||
tr("Shows the game you are currently playing as part of your profile in Discord."));
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<property name="title">
|
||||
<string>Behavior</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="formLayout_4">
|
||||
<layout class="QGridLayout" name="behaviorLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="confirmGameClose">
|
||||
<property name="text">
|
||||
@@ -72,6 +72,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="startFullscreenUI">
|
||||
<property name="text">
|
||||
<string>Start In Big Picture Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="enableDiscordPresence">
|
||||
<property name="text">
|
||||
<string>Enable Discord Presence</string>
|
||||
|
||||
@@ -3733,7 +3733,7 @@ int main(int argc, char* argv[])
|
||||
QtUtils::ShowOrRaiseWindow(g_main_window, nullptr, true);
|
||||
|
||||
// Initialize big picture mode if requested.
|
||||
if (QtHost::s_state.start_fullscreen_ui)
|
||||
if (QtHost::s_state.start_fullscreen_ui || Core::GetBaseBoolSettingValue("Main", "StartFullscreenUI", false))
|
||||
g_core_thread->startFullscreenUI();
|
||||
else
|
||||
QtHost::s_state.start_fullscreen_ui_fullscreen = false;
|
||||
|
||||
Reference in New Issue
Block a user