Add custom signal handlers to arbitrate between Qt and SDL

Fixes #1496
This commit is contained in:
Cameron Gutman 2025-12-14 18:57:26 -06:00
commit 4a591069ac
3 changed files with 98 additions and 0 deletions

View file

@ -1731,6 +1731,18 @@ void Session::start()
thread->start();
}
void Session::interrupt()
{
// Stop any connection in progress
LiInterruptConnection();
// Inject a quit event to our SDL event loop
SDL_Event event;
event.type = SDL_QUIT;
event.quit.timestamp = SDL_GetTicks();
SDL_PushEvent(&event);
}
void Session::exec()
{
// If the connection failed, clean up and abort the connection.