mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-22 07:59:44 +00:00
FIFOPlayerWindow: Trigger destructor on Dolphin shutdown
Make MainWindow::m_fifo_window a unique_ptr to ensure its destructor is triggered when MainWindow is destroyed. FIFOPlayerWindow doesn't set MainWindow as its parent in order to prevent raising MainWindow when focusing FIFOPlayerWindow. This avoids MainWindow covering up RenderWidget when, e.g., trying to use the object range feature to pinpoint the index of a particular object. As a consequence, unlike most QObjects FIFOPlayerWindow wasn't destroyed when its parent widget was since it didn't have one.
This commit is contained in:
parent
6f43f8eef5
commit
99be30c0e1
2 changed files with 6 additions and 4 deletions
|
@ -1379,8 +1379,8 @@ void MainWindow::ShowFIFOPlayer()
|
|||
{
|
||||
if (!m_fifo_window)
|
||||
{
|
||||
m_fifo_window = new FIFOPlayerWindow(m_system.GetFifoPlayer(), m_system.GetFifoRecorder());
|
||||
connect(m_fifo_window, &FIFOPlayerWindow::LoadFIFORequested, this,
|
||||
m_fifo_window.reset(new FIFOPlayerWindow(m_system.GetFifoPlayer(), m_system.GetFifoRecorder()));
|
||||
connect(m_fifo_window.get(), &FIFOPlayerWindow::LoadFIFORequested, this,
|
||||
[this](const QString& path) { StartGame(path, ScanForSecondDisc::No); });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue