mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
Initialise cursor hiding timer before potential deletion of ScreenPanelGL
This commit is contained in:
@ -1431,6 +1431,11 @@ void MainWindow::createScreenPanel()
|
|||||||
{
|
{
|
||||||
panelGL = new ScreenPanelGL(this);
|
panelGL = new ScreenPanelGL(this);
|
||||||
panelGL->show();
|
panelGL->show();
|
||||||
|
|
||||||
|
panel = panelGL;
|
||||||
|
panelGL->setMouseTracking(true);
|
||||||
|
mouseTimer = panelGL->setupMouseTimer();
|
||||||
|
connect(mouseTimer, &QTimer::timeout, [=] { if (Config::MouseHide) panelGL->setCursor(Qt::BlankCursor);});
|
||||||
|
|
||||||
if (!panelGL->isValid())
|
if (!panelGL->isValid())
|
||||||
hasOGL = false;
|
hasOGL = false;
|
||||||
@ -1443,14 +1448,6 @@ void MainWindow::createScreenPanel()
|
|||||||
|
|
||||||
if (!hasOGL)
|
if (!hasOGL)
|
||||||
delete panelGL;
|
delete panelGL;
|
||||||
|
|
||||||
if (hasOGL)
|
|
||||||
{
|
|
||||||
panel = panelGL;
|
|
||||||
panelGL->setMouseTracking(true);
|
|
||||||
mouseTimer = panelGL->setupMouseTimer();
|
|
||||||
connect(mouseTimer, &QTimer::timeout, [=] { if (Config::MouseHide) panelGL->setCursor(Qt::BlankCursor);});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasOGL)
|
if (!hasOGL)
|
||||||
|
Reference in New Issue
Block a user