Added Events::finalize

This commit is contained in:
MihailRis 2022-03-08 21:01:36 +03:00 committed by GitHub
parent e5fd0582d6
commit 667eb6bab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -330,6 +330,7 @@ int main() {
delete assets;
finalize_renderer();
Events::finalize();
Window::terminate();
return 0;
}

View File

@ -70,6 +70,11 @@ int Events::initialize(){
return 0;
}
void Events::finalize(){
delete[] _keys;
delete[] _frames;
}
bool Events::pressed(int keycode){
if (keycode < 0 || keycode >= _MOUSE_BUTTONS)
return false;

View File

@ -18,6 +18,7 @@ public:
static bool _cursor_started;
static int initialize();
static void finalize();
static void pullEvents();
static bool pressed(int keycode);