mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-05 11:11:47 -06:00
Implemented SDL event listener class and HUD toggle key (#4)
* Implemented SDL event listener class * Add HUD toggle. * frontend_listener: clean-up * window: invoke all listener callbacks at once * window: use raw pointers for listeners * Rename WindowListener to SDLEventListener, reduce virtual functions --------- Co-authored-by: RadiantDerg <jayvier13@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "window.h"
|
||||
#include "sdl_listener.h"
|
||||
#include <config.h>
|
||||
#include <kernel/function.h>
|
||||
#include <SDL_syswm.h>
|
||||
@@ -107,6 +108,9 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
|
||||
}
|
||||
}
|
||||
|
||||
for (auto listener : Window::s_eventListeners)
|
||||
listener->OnSDLEvent(event);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user