[nostalgia/core/gba] Fix event cycle and add to setter for event handler

This commit is contained in:
2020-07-17 01:36:51 -05:00
parent a58467f327
commit dc0667ade4
12 changed files with 111 additions and 36 deletions
+7
View File
@@ -9,9 +9,12 @@
#include <SDL.h>
#include <nostalgia/core/gfx.hpp>
#include <nostalgia/core/core.hpp>
namespace nostalgia::core {
static event_handler g_eventHandler = nullptr;
void draw(Context *ctx);
ox::Error init(Context *ctx) {
@@ -41,6 +44,10 @@ ox::Error run(Context *ctx) {
return OxError(0);
}
void setEventHandler(event_handler h) {
g_eventHandler = h;
}
uint64_t ticksMs() {
return SDL_GetTicks();;
}