mirror of
https://github.com/thejerf/baijiSteamVR.git
synced 2026-10-18 16:01:35 +02:00
In flat Vulkan mode, Steam Frame controller buttons can appear not to reach the game while the system's laser-pointer mode still owns focus. This is an easy mistake to make when starting a game from the headset. After a successful boot, show an informational dialog for explicit Flat Display (Vulkan) mode and for legacy configurations with OpenXR disabled. The check happens after boot metadata and per-game VR settings are loaded, so immersive VR and Stereo 3D Screen launches are not interrupted. Add the requested reminder text and a Never See This Dialog Again checkbox. Persist the opt-out in Main.Interface, and leave it unchecked by default so the reminder appears for new users.
45 lines
1.5 KiB
C++
45 lines
1.5 KiB
C++
// Copyright 2026 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "DolphinQt/FrameFlatModeInputWarningDialog.h"
|
|
|
|
#include <QCheckBox>
|
|
#include <QDialogButtonBox>
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
|
|
#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);
|
|
}
|