mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
Add support for fullscreen hotkey (#748)
This commit is contained in:
@ -266,6 +266,7 @@ EmuThread::EmuThread(QObject* parent) : QThread(parent)
|
||||
connect(this, SIGNAL(windowEmuPause()), mainWindow->actPause, SLOT(trigger()));
|
||||
connect(this, SIGNAL(windowEmuReset()), mainWindow->actReset, SLOT(trigger()));
|
||||
connect(this, SIGNAL(screenLayoutChange()), mainWindow->panel, SLOT(onScreenLayoutChanged()));
|
||||
connect(this, SIGNAL(windowFullscreenToggle()), mainWindow, SLOT(onFullscreenToggled()));
|
||||
|
||||
if (mainWindow->hasOGL) initOpenGL();
|
||||
}
|
||||
@ -364,6 +365,8 @@ void EmuThread::run()
|
||||
|
||||
if (Input::HotkeyPressed(HK_Pause)) emit windowEmuPause();
|
||||
if (Input::HotkeyPressed(HK_Reset)) emit windowEmuReset();
|
||||
|
||||
if (Input::HotkeyPressed(HK_FullscreenToggle)) emit windowFullscreenToggle();
|
||||
|
||||
if (GBACart::CartInserted && GBACart::HasSolarSensor)
|
||||
{
|
||||
@ -1878,6 +1881,20 @@ void MainWindow::onTitleUpdate(QString title)
|
||||
setWindowTitle(title);
|
||||
}
|
||||
|
||||
void MainWindow::onFullscreenToggled()
|
||||
{
|
||||
if (!mainWindow->isFullScreen())
|
||||
{
|
||||
mainWindow->showFullScreen();
|
||||
mainWindow->menuBar()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
mainWindow->showNormal();
|
||||
mainWindow->menuBar()->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::onEmuStart()
|
||||
{
|
||||
// TODO: make savestates work in DSi mode!!
|
||||
|
Reference in New Issue
Block a user