-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra callbacks and pointer fixing #30
Comments
|
|
@septag See issue #39 I have started working on an API for custom plugin callbacks with support for reloading and crash recovery. The basic support is working see https://github.com/Neopallium/cr/tree/symbols
|
Closing due inactivity, thank you. |
I've been thinking about couple of improvements for Cr :
Crash callback: when initializing plugins we could pass an optional crash handler callback to report plugin crashes to the host app
We could have a
reload plugin
callback that notifies the host whether a plugin is reloaded, so host can do some extra stuff like pointer fixing (see below)There is a problem where we have to assign some callbacks that reside in the plugin to the host. for example gameplay events or coroutines , etc.. when plugin reloads, the callbacks may become invalid. So we can define another
CR_STATE
(for exampleCR_POINTER
) like variable section that instead of reloading the section data, it keeps the data, but reports them to the host app, so the host could fix and replace those pointers. in order to not break the api compatibility, we can add a newcr_plugin_load
function with these callbacks as arguments.There is also a need for event dispatching to plugins that is somewhat custom and cannot be handled by
cr_main
. For example you want to post mouse movements to all the plugins. so besidescr_main
we could also havecr_events
with avoid*
argument, that we can call a function likecr_dispatch_event
from the host app to be called on every plugin. it's also optional. the plugin can also choose to implement it or notIf you are interested I can make a PR for them. Any suggestions ?
The text was updated successfully, but these errors were encountered: