diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index eeeb311778..0f40bed58c 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -426,6 +426,8 @@ const Info MAIN_ABORT_ON_PANIC_ALERT{{System::Main, "Interface", "AbortOnP const Info MAIN_OSD_MESSAGES{{System::Main, "Interface", "OnScreenDisplayMessages"}, true}; const Info MAIN_OSD_FONT_SIZE{{System::Main, "Settings", "OSDFontSize"}, 13}; const Info MAIN_SKIP_NKIT_WARNING{{System::Main, "Interface", "SkipNKitWarning"}, false}; +const Info MAIN_SKIP_FLAT_MODE_INPUT_WARNING{ + {System::Main, "Interface", "SkipFlatModeInputWarning"}, false}; const Info MAIN_CONFIRM_ON_STOP{{System::Main, "Interface", "ConfirmStop"}, true}; const Info MAIN_SHOW_CURSOR{{System::Main, "Interface", "CursorVisibility"}, ShowCursor::OnMovement}; diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index 1946045e48..9a439f0d8d 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -248,6 +248,7 @@ extern const Info MAIN_ABORT_ON_PANIC_ALERT; extern const Info MAIN_OSD_MESSAGES; extern const Info MAIN_OSD_FONT_SIZE; extern const Info MAIN_SKIP_NKIT_WARNING; +extern const Info MAIN_SKIP_FLAT_MODE_INPUT_WARNING; extern const Info MAIN_CONFIRM_ON_STOP; enum class ShowCursor diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index c8e93c3baf..daed4cab4a 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -339,6 +339,8 @@ add_executable(dolphin-emu NetPlay/PadMappingDialog.h NANDRepairDialog.cpp NANDRepairDialog.h + FrameFlatModeInputWarningDialog.cpp + FrameFlatModeInputWarningDialog.h NKitWarningDialog.cpp NKitWarningDialog.h QtUtils/AnalyticsPrompt.cpp diff --git a/Source/Core/DolphinQt/FrameFlatModeInputWarningDialog.cpp b/Source/Core/DolphinQt/FrameFlatModeInputWarningDialog.cpp new file mode 100644 index 0000000000..42f012f1db --- /dev/null +++ b/Source/Core/DolphinQt/FrameFlatModeInputWarningDialog.cpp @@ -0,0 +1,44 @@ +// Copyright 2026 Dolphin Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "DolphinQt/FrameFlatModeInputWarningDialog.h" + +#include +#include +#include +#include + +#include "Common/Config/Config.h" +#include "Core/Config/MainSettings.h" +#include "DolphinQt/Resources.h" + +void FrameFlatModeInputWarningDialog::ShowUnlessDisabled(QWidget* parent) +{ + if (Config::Get(Config::MAIN_SKIP_FLAT_MODE_INPUT_WARNING)) + return; + + FrameFlatModeInputWarningDialog dialog(parent); + if (dialog.exec() == QDialog::Accepted && dialog.m_never_show_again->isChecked()) + Config::SetBase(Config::MAIN_SKIP_FLAT_MODE_INPUT_WARNING, true); +} + +FrameFlatModeInputWarningDialog::FrameFlatModeInputWarningDialog(QWidget* parent) : QDialog(parent) +{ + setWindowTitle(tr("Flat-Mode Input Reminder")); + setWindowIcon(Resources::GetAppIcon()); + + auto* const layout = new QVBoxLayout(this); + auto* const reminder = new QLabel( + tr("Remember, you must click out of laser pointing mode before trying to control the game! " + "Otherwise the game will seem like it has no controls."), + this); + reminder->setWordWrap(true); + layout->addWidget(reminder); + + m_never_show_again = new QCheckBox(tr("Never See This Dialog Again"), this); + layout->addWidget(m_never_show_again); + + auto* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok, this); + connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); + layout->addWidget(buttons); +} diff --git a/Source/Core/DolphinQt/FrameFlatModeInputWarningDialog.h b/Source/Core/DolphinQt/FrameFlatModeInputWarningDialog.h new file mode 100644 index 0000000000..2aa8992e29 --- /dev/null +++ b/Source/Core/DolphinQt/FrameFlatModeInputWarningDialog.h @@ -0,0 +1,22 @@ +// Copyright 2026 Dolphin Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +class QCheckBox; +class QWidget; + +class FrameFlatModeInputWarningDialog final : public QDialog +{ + Q_OBJECT + +public: + static void ShowUnlessDisabled(QWidget* parent = nullptr); + +private: + explicit FrameFlatModeInputWarningDialog(QWidget* parent = nullptr); + + QCheckBox* m_never_show_again = nullptr; +}; diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 694e4cfad9..0ee56b6a76 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -45,6 +45,7 @@ #include "Core/BootManager.h" #include "Core/CommonTitles.h" #include "Core/Config/AchievementSettings.h" +#include "Core/Config/GraphicsSettings.h" #include "Core/Config/MainSettings.h" #include "Core/Config/NetplaySettings.h" #include "Core/Config/UISettings.h" @@ -94,6 +95,7 @@ #include "DolphinQt/EmulatedUSB/LogitechMicWindow.h" #include "DolphinQt/EmulatedUSB/WiiSpeakWindow.h" #include "DolphinQt/FIFO/FIFOPlayerWindow.h" +#include "DolphinQt/FrameFlatModeInputWarningDialog.h" #include "DolphinQt/GCMemcardManager.h" #include "DolphinQt/GameList/GameList.h" #include "DolphinQt/Host.h" @@ -132,6 +134,7 @@ #include "UICommon/UICommon.h" #include "VideoCommon/NetPlayChatUI.h" +#include "VideoCommon/VideoConfig.h" #ifdef HAVE_XRANDR #include "UICommon/X11Utils.h" @@ -1208,6 +1211,16 @@ void MainWindow::StartGame(std::unique_ptr&& parameters) return; } +#ifdef BAIJI_STEAMVR + const OpenXRPresentationMode presentation_mode = Config::Get(Config::GFX_VR_PRESENTATION_MODE); + if (presentation_mode == OpenXRPresentationMode::Vulkan || + (presentation_mode == OpenXRPresentationMode::Legacy && + !Config::Get(Config::GFX_VR_ENABLE_OPENXR))) + { + FrameFlatModeInputWarningDialog::ShowUnlessDisabled(this); + } +#endif + #ifdef USE_DISCORD_PRESENCE if (!NetPlay::IsNetPlayRunning()) Discord::UpdateDiscordPresence();