mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 13:41:05 +00:00
QT: Keep the render window invisible until emulation starts
This commit is contained in:
parent
0ff414f561
commit
80e9064179
@ -316,6 +316,7 @@ void GMainWindow::ToggleWindowMode() {
|
|||||||
// Render in the main window...
|
// Render in the main window...
|
||||||
render_window->BackupGeometry();
|
render_window->BackupGeometry();
|
||||||
ui.horizontalLayout->addWidget(render_window);
|
ui.horizontalLayout->addWidget(render_window);
|
||||||
|
if (emu_thread != nullptr)
|
||||||
render_window->setVisible(true);
|
render_window->setVisible(true);
|
||||||
render_window->setFocusPolicy(Qt::ClickFocus);
|
render_window->setFocusPolicy(Qt::ClickFocus);
|
||||||
render_window->setFocus();
|
render_window->setFocus();
|
||||||
@ -324,6 +325,7 @@ void GMainWindow::ToggleWindowMode() {
|
|||||||
// Render in a separate window...
|
// Render in a separate window...
|
||||||
ui.horizontalLayout->removeWidget(render_window);
|
ui.horizontalLayout->removeWidget(render_window);
|
||||||
render_window->setParent(nullptr);
|
render_window->setParent(nullptr);
|
||||||
|
if (emu_thread != nullptr)
|
||||||
render_window->setVisible(true);
|
render_window->setVisible(true);
|
||||||
render_window->RestoreGeometry();
|
render_window->RestoreGeometry();
|
||||||
render_window->setFocusPolicy(Qt::NoFocus);
|
render_window->setFocusPolicy(Qt::NoFocus);
|
||||||
|
Loading…
Reference in New Issue
Block a user