From 7345e2e2553c96055a0527f11abc9386cf1b7de4 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:09:14 +0300 Subject: [PATCH] Update hydra_core.cpp --- src/hydra_core.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/hydra_core.cpp b/src/hydra_core.cpp index 793e3abf..6d1a9a1d 100644 --- a/src/hydra_core.cpp +++ b/src/hydra_core.cpp @@ -90,7 +90,6 @@ void HydraCore::runFrame() { } hid.updateInputs(emulator->getTicks()); - emulator->runFrame(); } @@ -116,16 +115,14 @@ void HydraCore::resetContext() { emulator->initGraphicsContext(nullptr); } -void HydraCore::destroyContext() {} - +void HydraCore::destroyContext() { emulator.deinitGraphicsContext(); } void HydraCore::setFbo(unsigned handle) { renderer->setFBO(handle); } - void HydraCore::setGetProcAddress(void* function) { getProcAddress = function; } void HydraCore::setPollInputCallback(void (*callback)()) { pollInputCallback = callback; } void HydraCore::setCheckButtonCallback(int32_t (*callback)(uint32_t player, hydra::ButtonType button)) { checkButtonCallback = callback; } -HC_API hydra::IBase* createEmulator() { return new HydraCore; } +HC_API hydra::IBase* createEmulator() { return new HydraCore(); } HC_API void destroyEmulator(hydra::IBase* emulator) { delete emulator; } HC_API const char* getInfo(hydra::InfoType type) { @@ -145,4 +142,4 @@ HC_API const char* getInfo(hydra::InfoType type) { default: return nullptr; } -} \ No newline at end of file +}