MCPcopy Create free account
hub / github.com/crosire/reshade / ReShadeRegisterOverlayForAddon

Function ReShadeRegisterOverlayForAddon

source/addon_manager.cpp:626–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624 ReShadeRegisterOverlayForAddon(nullptr, title, callback);
625}
626void ReShadeRegisterOverlayForAddon(void *module, const char *title, void(*callback)(reshade::api::effect_runtime *runtime))
627{
628 reshade::addon_info *const info = reshade::find_addon(module != nullptr ? module : static_cast<void *>(callback));
629 if (info == nullptr)
630 {
631 reshade::log::message(reshade::log::level::error, "Could not find associated add-on and therefore failed to register overlay with title \"%s\".", title);
632 return;
633 }
634
635 assert(info->handle == module || module == nullptr);
636
637 if (title == nullptr)
638 {
639 info->settings_overlay_callback = callback;
640 return;
641 }
642
643 info->overlay_callbacks.push_back(reshade::addon_info::overlay_callback { title, callback });
644
645#if RESHADE_VERBOSE_LOG
646 reshade::log::message(reshade::log::level::debug, "Registered overlay with title \"%s\" and callback %p.", title, static_cast<void *>(callback));
647#endif
648}
649void ReShadeUnregisterOverlay(const char *title, void(*callback)(reshade::api::effect_runtime *runtime))
650{
651 ReShadeUnregisterOverlayForAddon(nullptr, title, callback);

Callers 1

ReShadeRegisterOverlayFunction · 0.85

Calls 1

messageFunction · 0.85

Tested by

no test coverage detected