mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 10:43:33 +00:00
Merge branch 'Untoggle_UI_Wayland' into 'main'
fix: Untoggle UI & Wayland Qt Functions See merge request citron/emulator!61
This commit is contained in:
@@ -1446,10 +1446,10 @@ void GMainWindow::RestoreUIState() {
|
|||||||
restoreState(UISettings::values.state);
|
restoreState(UISettings::values.state);
|
||||||
render_window->setWindowFlags(render_window->windowFlags() & ~Qt::FramelessWindowHint);
|
render_window->setWindowFlags(render_window->windowFlags() & ~Qt::FramelessWindowHint);
|
||||||
render_window->restoreGeometry(UISettings::values.renderwindow_geometry);
|
render_window->restoreGeometry(UISettings::values.renderwindow_geometry);
|
||||||
#if MICROPROFILE_ENABLED
|
#if MICROPROFILE_ENABLED
|
||||||
microProfileDialog->restoreGeometry(UISettings::values.microprofile_geometry);
|
microProfileDialog->restoreGeometry(UISettings::values.microprofile_geometry);
|
||||||
microProfileDialog->setVisible(UISettings::values.microprofile_visible.GetValue());
|
microProfileDialog->setVisible(UISettings::values.microprofile_visible.GetValue());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
game_list->LoadInterfaceLayout();
|
game_list->LoadInterfaceLayout();
|
||||||
|
|
||||||
@@ -1469,15 +1469,19 @@ void GMainWindow::RestoreUIState() {
|
|||||||
|
|
||||||
ui->action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar.GetValue());
|
ui->action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar.GetValue());
|
||||||
statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
|
statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
|
||||||
ui->action_Show_Performance_Overlay->setChecked(UISettings::values.show_performance_overlay.GetValue());
|
|
||||||
|
// Force the performance overlay to be off on startup
|
||||||
|
ui->action_Show_Performance_Overlay->setChecked(false);
|
||||||
if (performance_overlay) {
|
if (performance_overlay) {
|
||||||
performance_overlay->SetVisible(ui->action_Show_Performance_Overlay->isChecked());
|
performance_overlay->SetVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->action_Show_Vram_Overlay->setChecked(UISettings::values.show_vram_overlay.GetValue());
|
// Force the VRAM overlay to be off on startup
|
||||||
|
ui->action_Show_Vram_Overlay->setChecked(false);
|
||||||
if (vram_overlay) {
|
if (vram_overlay) {
|
||||||
vram_overlay->SetVisible(ui->action_Show_Vram_Overlay->isChecked());
|
vram_overlay->SetVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Debugger::ToggleConsole();
|
Debugger::ToggleConsole();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4435,13 +4439,19 @@ void GMainWindow::OnToggleStatusBar() {
|
|||||||
|
|
||||||
void GMainWindow::OnTogglePerformanceOverlay() {
|
void GMainWindow::OnTogglePerformanceOverlay() {
|
||||||
if (performance_overlay) {
|
if (performance_overlay) {
|
||||||
performance_overlay->SetVisible(ui->action_Show_Performance_Overlay->isChecked());
|
const bool is_checked = ui->action_Show_Performance_Overlay->isChecked();
|
||||||
|
performance_overlay->SetVisible(is_checked);
|
||||||
|
|
||||||
|
UISettings::values.show_performance_overlay = is_checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnToggleVramOverlay() {
|
void GMainWindow::OnToggleVramOverlay() {
|
||||||
if (vram_overlay) {
|
if (vram_overlay) {
|
||||||
vram_overlay->SetVisible(ui->action_Show_Vram_Overlay->isChecked());
|
const bool is_checked = ui->action_Show_Vram_Overlay->isChecked();
|
||||||
|
vram_overlay->SetVisible(is_checked);
|
||||||
|
|
||||||
|
UISettings::values.show_vram_overlay = is_checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4931,10 +4941,10 @@ void GMainWindow::UpdateUISettings() {
|
|||||||
UISettings::values.renderwindow_geometry = render_window->saveGeometry();
|
UISettings::values.renderwindow_geometry = render_window->saveGeometry();
|
||||||
}
|
}
|
||||||
UISettings::values.state = saveState();
|
UISettings::values.state = saveState();
|
||||||
#if MICROPROFILE_ENABLED
|
#if MICROPROFILE_ENABLED
|
||||||
UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry();
|
UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry();
|
||||||
UISettings::values.microprofile_visible = microProfileDialog->isVisible();
|
UISettings::values.microprofile_visible = microProfileDialog->isVisible();
|
||||||
#endif
|
#endif
|
||||||
UISettings::values.single_window_mode = ui->action_Single_Window_Mode->isChecked();
|
UISettings::values.single_window_mode = ui->action_Single_Window_Mode->isChecked();
|
||||||
UISettings::values.fullscreen = ui->action_Fullscreen->isChecked();
|
UISettings::values.fullscreen = ui->action_Fullscreen->isChecked();
|
||||||
UISettings::values.display_titlebar = ui->action_Display_Dock_Widget_Headers->isChecked();
|
UISettings::values.display_titlebar = ui->action_Display_Dock_Widget_Headers->isChecked();
|
||||||
@@ -5534,6 +5544,11 @@ int main(int argc, char* argv[]) {
|
|||||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
#ifdef __linux__
|
||||||
|
if (QGuiApplication::platformName().startsWith(QStringLiteral("wayland"))) {
|
||||||
|
Settings::values.is_wayland_platform.SetValue(true);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CITRON_USE_AUTO_UPDATER
|
#ifdef CITRON_USE_AUTO_UPDATER
|
||||||
// Check for and apply staged updates before starting the main application
|
// Check for and apply staged updates before starting the main application
|
||||||
|
|||||||
Reference in New Issue
Block a user