Compare commits
2 Commits
dev-013d1f
...
dev-1ffee9
Author | SHA1 | Date | |
---|---|---|---|
1ffee9933a | |||
aaa23194c5 |
2
external/solanaceae_plugin
vendored
2
external/solanaceae_plugin
vendored
Submodule external/solanaceae_plugin updated: 82cfb6d492...f7a519754d
@ -73,7 +73,21 @@ MainScreen::MainScreen(SDL_Renderer* renderer_, Theme& theme_, std::string save_
|
||||
// TODO: pm?
|
||||
|
||||
// graphics
|
||||
g_provideInstance("ImGuiContext", ImGui::GetVersion(), "host", ImGui::GetCurrentContext());
|
||||
g_provideInstance<ImGuiContext>("ImGuiContext", ImGui::GetVersion(), "host", ImGui::GetCurrentContext());
|
||||
{
|
||||
ImGuiMemAllocFunc alloc_func = nullptr;
|
||||
ImGuiMemFreeFunc free_func = nullptr;
|
||||
void* user_data = nullptr;
|
||||
ImGui::GetAllocatorFunctions(&alloc_func, &free_func, &user_data);
|
||||
|
||||
// function pointers are funky
|
||||
g_provideInstance("ImGuiMemAllocFunc", ImGui::GetVersion(), "host", reinterpret_cast<void*>(alloc_func));
|
||||
g_provideInstance("ImGuiMemFreeFunc", ImGui::GetVersion(), "host", reinterpret_cast<void*>(free_func));
|
||||
if (user_data != nullptr) { // dont register nullptrs (can be valid, we rely on the other 2 pointers to indicate)
|
||||
g_provideInstance("ImGuiMemUserData", ImGui::GetVersion(), "host", user_data);
|
||||
}
|
||||
}
|
||||
|
||||
g_provideInstance<TextureUploaderI>("TextureUploaderI", "host", &sdlrtu);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user