mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
commit
30ccaa3fd5
@ -247,6 +247,9 @@ void CodeWidget::Update()
|
||||
|
||||
void CodeWidget::UpdateCallstack()
|
||||
{
|
||||
if (Core::GetState() == Core::State::Starting)
|
||||
return;
|
||||
|
||||
m_callstack_list->clear();
|
||||
|
||||
std::vector<Dolphin_Debugger::CallstackEntry> stack;
|
||||
|
@ -566,7 +566,7 @@ void MainWindow::FullScreen()
|
||||
// settings. If it's set to be fullscreen then it just remakes the window,
|
||||
// which probably isn't ideal.
|
||||
bool was_fullscreen = m_render_widget->isFullScreen();
|
||||
HideRenderWidget();
|
||||
HideRenderWidget(false);
|
||||
if (was_fullscreen)
|
||||
ShowRenderWidget();
|
||||
else
|
||||
@ -630,7 +630,7 @@ void MainWindow::ShowRenderWidget()
|
||||
{
|
||||
// Otherwise, just show it.
|
||||
m_rendering_to_main = false;
|
||||
if (SConfig::GetInstance().bFullscreen)
|
||||
if (SConfig::GetInstance().bFullscreen && !m_render_widget->isFullScreen())
|
||||
{
|
||||
m_render_widget->showFullScreen();
|
||||
}
|
||||
@ -642,7 +642,7 @@ void MainWindow::ShowRenderWidget()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::HideRenderWidget()
|
||||
void MainWindow::HideRenderWidget(bool reinit)
|
||||
{
|
||||
if (m_rendering_to_main)
|
||||
{
|
||||
@ -655,19 +655,23 @@ void MainWindow::HideRenderWidget()
|
||||
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
|
||||
}
|
||||
|
||||
m_render_widget->hide();
|
||||
|
||||
// The following code works around a driver bug that would lead to Dolphin crashing when changing
|
||||
// graphics backends (e.g. OpenGL to Vulkan). To avoid this the render widget is (safely)
|
||||
// recreated
|
||||
disconnect(m_render_widget, &RenderWidget::Closed, this, &MainWindow::ForceStop);
|
||||
if (reinit)
|
||||
{
|
||||
disconnect(m_render_widget, &RenderWidget::Closed, this, &MainWindow::ForceStop);
|
||||
|
||||
m_render_widget->hide();
|
||||
m_render_widget->removeEventFilter(this);
|
||||
m_render_widget->deleteLater();
|
||||
m_render_widget->removeEventFilter(this);
|
||||
m_render_widget->deleteLater();
|
||||
|
||||
m_render_widget = new RenderWidget;
|
||||
m_render_widget = new RenderWidget;
|
||||
|
||||
m_render_widget->installEventFilter(this);
|
||||
connect(m_render_widget, &RenderWidget::Closed, this, &MainWindow::ForceStop);
|
||||
m_render_widget->installEventFilter(this);
|
||||
connect(m_render_widget, &RenderWidget::Closed, this, &MainWindow::ForceStop);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::ShowControllersWindow()
|
||||
|
@ -100,7 +100,7 @@ private:
|
||||
void StartGame(const std::string& path, const std::optional<std::string>& savestate_path = {});
|
||||
void StartGame(std::unique_ptr<BootParameters>&& parameters);
|
||||
void ShowRenderWidget();
|
||||
void HideRenderWidget();
|
||||
void HideRenderWidget(bool reinit = true);
|
||||
|
||||
void ShowSettingsWindow();
|
||||
void ShowGeneralWindow();
|
||||
|
@ -49,6 +49,12 @@ void RenderWidget::HandleCursorTimer()
|
||||
setCursor(Qt::BlankCursor);
|
||||
}
|
||||
|
||||
void RenderWidget::showFullScreen()
|
||||
{
|
||||
QWidget::showFullScreen();
|
||||
emit SizeChanged(width(), height());
|
||||
}
|
||||
|
||||
bool RenderWidget::event(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
explicit RenderWidget(QWidget* parent = nullptr);
|
||||
|
||||
bool event(QEvent* event) override;
|
||||
void showFullScreen();
|
||||
|
||||
signals:
|
||||
void EscapePressed();
|
||||
|
Loading…
Reference in New Issue
Block a user