Skip to content

Commit

Permalink
Framework: Add support for QUIT command
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jun 22, 2024
1 parent 838668f commit a34f6de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Framework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,15 @@ void Framework::on_frontend_command(UEVRSharedMemory::Command command) {
break;
case UEVRSharedMemory::Command::CONFIG_SETUP_ACKNOWLEDGED:
m_uevr_shared_memory->data().signal_frontend_config_setup = false;
break;
case UEVRSharedMemory::Command::QUIT:
if (m_wnd != nullptr) {
PostMessageA(m_wnd, WM_CLOSE, 0, 0);
PostMessageA(m_wnd, WM_DESTROY, 0, 0);
PostMessageA(m_wnd, WM_QUIT, 0, 0);
m_terminating = true;
}

break;
default:
spdlog::error("Unknown frontend command received: {}", (int)command);
Expand Down
1 change: 1 addition & 0 deletions src/Framework.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class UEVRSharedMemory {
enum Command {
RELOAD_CONFIG = 0,
CONFIG_SETUP_ACKNOWLEDGED = 1,
QUIT = 2,
};

public:
Expand Down

0 comments on commit a34f6de

Please sign in to comment.