[nostalgia/core/gba] Fix event cycle and add to setter for event handler
This commit is contained in:
@@ -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();;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user