From 5802e7ddab314454062ea55bad2ab3db22b072b8 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 7 Jan 2024 17:04:49 +0100 Subject: [PATCH] update to plugin 7 --- plugins/plugin_crdtnotes.cpp | 6 ++---- plugins/plugin_crdtnotes_imgui.cpp | 11 +++++++---- plugins/plugin_crdtnotes_toxsync.cpp | 6 ++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/plugins/plugin_crdtnotes.cpp b/plugins/plugin_crdtnotes.cpp index 32fc48d..536a186 100644 --- a/plugins/plugin_crdtnotes.cpp +++ b/plugins/plugin_crdtnotes.cpp @@ -67,10 +67,8 @@ SOLANA_PLUGIN_EXPORT void solana_plugin_stop(void) { g_crdtns.reset(); } -SOLANA_PLUGIN_EXPORT void solana_plugin_tick(float delta) { - (void)delta; - //std::cout << "PLUGIN CRDTN TICK()\n"; - g_crdtns->iterate(delta); +SOLANA_PLUGIN_EXPORT float solana_plugin_tick(float delta) { + return g_crdtns->iterate(delta); } } // extern C diff --git a/plugins/plugin_crdtnotes_imgui.cpp b/plugins/plugin_crdtnotes_imgui.cpp index ec54ac3..23f67af 100644 --- a/plugins/plugin_crdtnotes_imgui.cpp +++ b/plugins/plugin_crdtnotes_imgui.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #define RESOLVE_INSTANCE(x) static_cast(solana_api->resolveInstance(#x)) @@ -79,10 +80,12 @@ SOLANA_PLUGIN_EXPORT void solana_plugin_stop(void) { g_crdtn_imgui.reset(); } -SOLANA_PLUGIN_EXPORT void solana_plugin_tick(float delta) { - (void)delta; - //std::cout << "PLUGIN CRDTNIMGUI TICK()\n"; - g_crdtn_imgui->render(); +SOLANA_PLUGIN_EXPORT float solana_plugin_tick(float delta) { + return std::numeric_limits::max(); +} + +SOLANA_PLUGIN_EXPORT float solana_plugin_render(float delta) { + return g_crdtn_imgui->render(); } } // extern C diff --git a/plugins/plugin_crdtnotes_toxsync.cpp b/plugins/plugin_crdtnotes_toxsync.cpp index 6f40944..14caff9 100644 --- a/plugins/plugin_crdtnotes_toxsync.cpp +++ b/plugins/plugin_crdtnotes_toxsync.cpp @@ -96,10 +96,8 @@ SOLANA_PLUGIN_EXPORT void solana_plugin_stop(void) { g_crdtn_ts.reset(); } -SOLANA_PLUGIN_EXPORT void solana_plugin_tick(float delta) { - (void)delta; - //std::cout << "PLUGIN CRDTN TICK()\n"; - g_crdtn_ts->iterate(delta); +SOLANA_PLUGIN_EXPORT float solana_plugin_tick(float delta) { + return g_crdtn_ts->iterate(delta); } } // extern C