Make sure important data is synchronized between ImHex and plugins

This commit is contained in:
WerWolv
2021-01-04 00:19:56 +01:00
parent c7c654d310
commit eed7ef1ac3
24 changed files with 148 additions and 113 deletions

View File

@@ -6,13 +6,13 @@
#include <hex.hpp>
#include <views/view.hpp>
#include <providers/provider.hpp>
#include <helpers/shared_data.hpp>
#define IMHEX_PLUGIN namespace hex::plugin::internal { \
void initializePlugin(ImGuiContext *ctx, hex::prv::Provider **provider) { \
if (glGetString == NULL) \
gladLoadGL(); \
ImGui::SetCurrentContext(ctx); \
hex::prv::Provider::setProviderStorage(*provider); \
} \
} \
#define IMHEX_PLUGIN namespace hex::plugin::internal { \
void initializePlugin(SharedData &sharedData) { \
if (glGetString == NULL) \
gladLoadGL(); \
SharedData::get().initializeData(sharedData); \
} \
} \
namespace hex::plugin