qt: Remove status bar 3D controls due to issues. (#6317)

The 3D toggle does not behave correctly as it does not have some
special logic from the enhancements configuration UI that determines
the post-processing shader defaults to use. Because of that, plus
an uptick in people seemingly accidentally enabling 3D options and
not being sure why Citra is rendering differently, just remove the
new UI components for now until better ideas for 3D control can
be worked out.
This commit is contained in:
Steveice10 2023-02-28 04:10:14 -08:00 committed by GitHub
parent 3c15398f9e
commit c6f9fd3b65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 48 deletions

View file

@ -117,7 +117,6 @@ __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
#endif #endif
constexpr int default_mouse_timeout = 2500; constexpr int default_mouse_timeout = 2500;
constexpr int num_options_3d = 5;
/** /**
* "Callouts" are one-time instructional messages shown to the user. In the config settings, there * "Callouts" are one-time instructional messages shown to the user. In the config settings, there
@ -225,7 +224,6 @@ GMainWindow::GMainWindow()
ConnectMenuEvents(); ConnectMenuEvents();
ConnectWidgetEvents(); ConnectWidgetEvents();
Connect3DStateEvents();
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch, LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
Common::g_scm_desc); Common::g_scm_desc);
@ -350,20 +348,6 @@ void GMainWindow::InitializeWidgets() {
statusBar()->addPermanentWidget(label); statusBar()->addPermanentWidget(label);
} }
option_3d_button = new QPushButton();
option_3d_button->setObjectName(QStringLiteral("3DOptionStatusBarButton"));
option_3d_button->setFocusPolicy(Qt::NoFocus);
option_3d_button->setToolTip(tr("Indicates the current 3D setting. Click to toggle."));
factor_3d_slider = new QSlider(Qt::Orientation::Horizontal, this);
factor_3d_slider->setStyleSheet(QStringLiteral("QSlider { padding: 4px; }"));
factor_3d_slider->setToolTip(tr("Current 3D factor while 3D is enabled."));
factor_3d_slider->setRange(0, 100);
Update3DState();
statusBar()->insertPermanentWidget(0, option_3d_button);
statusBar()->insertPermanentWidget(1, factor_3d_slider);
statusBar()->addPermanentWidget(multiplayer_state->GetStatusText()); statusBar()->addPermanentWidget(multiplayer_state->GetStatusText());
statusBar()->addPermanentWidget(multiplayer_state->GetStatusIcon()); statusBar()->addPermanentWidget(multiplayer_state->GetStatusIcon());
@ -615,8 +599,6 @@ void GMainWindow::InitializeHotkeys() {
connect_shortcut(QStringLiteral("Mute Audio"), connect_shortcut(QStringLiteral("Mute Audio"),
[] { Settings::values.audio_muted = !Settings::values.audio_muted; }); [] { Settings::values.audio_muted = !Settings::values.audio_muted; });
connect_shortcut(QStringLiteral("Toggle 3D"), &GMainWindow::Toggle3D);
// We use "static" here in order to avoid capturing by lambda due to a MSVC bug, which makes the // We use "static" here in order to avoid capturing by lambda due to a MSVC bug, which makes the
// variable hold a garbage value after this function exits // variable hold a garbage value after this function exits
static constexpr u16 FACTOR_3D_STEP = 5; static constexpr u16 FACTOR_3D_STEP = 5;
@ -873,12 +855,6 @@ void GMainWindow::UpdateMenuState() {
} }
} }
void GMainWindow::Connect3DStateEvents() {
connect(option_3d_button, &QPushButton::clicked, this, &GMainWindow::Toggle3D);
connect(factor_3d_slider, qOverload<int>(&QSlider::valueChanged), this,
[](int value) { Settings::values.factor_3d = value; });
}
void GMainWindow::OnDisplayTitleBars(bool show) { void GMainWindow::OnDisplayTitleBars(bool show) {
QList<QDockWidget*> widgets = findChildren<QDockWidget*>(); QList<QDockWidget*> widgets = findChildren<QDockWidget*>();
@ -1975,7 +1951,6 @@ void GMainWindow::OnConfigure() {
setMouseTracking(false); setMouseTracking(false);
} }
UpdateSecondaryWindowVisibility(); UpdateSecondaryWindowVisibility();
Update3DState();
} else { } else {
Settings::values.input_profiles = old_input_profiles; Settings::values.input_profiles = old_input_profiles;
Settings::values.touch_from_button_maps = old_touch_from_button_maps; Settings::values.touch_from_button_maps = old_touch_from_button_maps;
@ -2269,18 +2244,6 @@ void GMainWindow::UpdateStatusBar() {
emu_frametime_label->setVisible(true); emu_frametime_label->setVisible(true);
} }
void GMainWindow::Update3DState() {
static const std::array options_3d = {tr("Off"), tr("Side by Side"), tr("Anaglyph"),
tr("Interlaced"), tr("Reverse Interlaced")};
option_3d_button->setText(
tr("3D: %1").arg(options_3d[static_cast<int>(Settings::values.render_3d.GetValue())]));
factor_3d_slider->setValue(Settings::values.factor_3d.GetValue());
factor_3d_slider->setVisible(Settings::values.render_3d.GetValue() !=
Settings::StereoRenderOption::Off);
}
void GMainWindow::HideMouseCursor() { void GMainWindow::HideMouseCursor() {
if (emu_thread == nullptr || !UISettings::values.hide_mouse.GetValue()) { if (emu_thread == nullptr || !UISettings::values.hide_mouse.GetValue()) {
mouse_hide_timer.stop(); mouse_hide_timer.stop();
@ -2392,12 +2355,6 @@ void GMainWindow::OnMenuAboutCitra() {
about.exec(); about.exec();
} }
void GMainWindow::Toggle3D() {
Settings::values.render_3d = static_cast<Settings::StereoRenderOption>(
(static_cast<int>(Settings::values.render_3d.GetValue()) + 1) % num_options_3d);
Update3DState();
}
bool GMainWindow::ConfirmClose() { bool GMainWindow::ConfirmClose() {
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) if (emu_thread == nullptr || !UISettings::values.confirm_before_closing)
return true; return true;

View file

@ -120,7 +120,6 @@ private:
void RestoreUIState(); void RestoreUIState();
void ConnectWidgetEvents(); void ConnectWidgetEvents();
void Connect3DStateEvents();
void ConnectMenuEvents(); void ConnectMenuEvents();
void UpdateMenuState(); void UpdateMenuState();
@ -228,7 +227,6 @@ private slots:
void OnStopVideoDumping(); void OnStopVideoDumping();
#endif #endif
void OnCoreError(Core::System::ResultStatus, std::string); void OnCoreError(Core::System::ResultStatus, std::string);
void Toggle3D();
/// Called whenever a user selects Help->About Citra /// Called whenever a user selects Help->About Citra
void OnMenuAboutCitra(); void OnMenuAboutCitra();
void OnUpdateFound(bool found, bool error); void OnUpdateFound(bool found, bool error);
@ -240,7 +238,6 @@ private slots:
private: private:
Q_INVOKABLE void OnMoviePlaybackCompleted(); Q_INVOKABLE void OnMoviePlaybackCompleted();
void UpdateStatusBar(); void UpdateStatusBar();
void Update3DState();
void LoadTranslation(); void LoadTranslation();
void UpdateWindowTitle(); void UpdateWindowTitle();
void UpdateUISettings(); void UpdateUISettings();
@ -264,8 +261,6 @@ private:
QLabel* emu_speed_label = nullptr; QLabel* emu_speed_label = nullptr;
QLabel* game_fps_label = nullptr; QLabel* game_fps_label = nullptr;
QLabel* emu_frametime_label = nullptr; QLabel* emu_frametime_label = nullptr;
QPushButton* option_3d_button = nullptr;
QSlider* factor_3d_slider = nullptr;
QTimer status_bar_update_timer; QTimer status_bar_update_timer;
bool message_label_used_for_movie = false; bool message_label_used_for_movie = false;