Add SDL_EVENT_QUIT

This commit is contained in:
VoxelTek 2025-08-20 10:03:01 +10:00
parent ce551deb46
commit 515cc584fd

View File

@ -862,8 +862,8 @@ void CMainDialog::PollInputs()
{ {
SDL_Event event; SDL_Event event;
while (SDL_PollEvent(&event)) { while (SDL_PollEvent(&event)) {
if (event.type == SDL_EVENT_KEY_DOWN) { if (event.type == SDL_EVENT_KEY_DOWN || event.type == SDL_EVENT_QUIT) {
if (event.key.scancode != SDL_SCANCODE_ESCAPE) { if (event.type == SDL_EVENT_KEY_DOWN && event.key.scancode != SDL_SCANCODE_ESCAPE) {
SDL_Scancode sc = event.key.scancode; SDL_Scancode sc = event.key.scancode;
*m_currentKeyBind = sc; *m_currentKeyBind = sc;
m_modified = true; m_modified = true;