Update EmuApplication.cpp: handle Quit binding

Added handling of binding for Quit.
This commit is contained in:
Gilberto Chavez-Martinez 2024-12-17 19:24:07 -05:00 committed by GitHub
parent b83f789343
commit 6794f51461
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -386,6 +386,10 @@ void EmuApplication::handleBinding(std::string name, bool pressed)
{ {
window->openFile(); window->openFile();
} }
else if (name == "Quit" && pressed)
{
window->close();
}
} }
bool EmuApplication::isBound(EmuBinding b) bool EmuApplication::isBound(EmuBinding b)
@ -741,4 +745,4 @@ void EmuThread::run()
void EmuThread::setMainLoop(std::function<void ()> loop) void EmuThread::setMainLoop(std::function<void ()> loop)
{ {
main_loop = loop; main_loop = loop;
} }