mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[client] overlay: move keybinds and config into the overlays
This adds a new `earlyInit` call which allows the overlay to register options before actually being intialized. Also the keybind handling and state tracking for each overlay has been moved internal to the overlay itself.
This commit is contained in:
@@ -83,7 +83,8 @@ void app_glSwapBuffers(void);
|
||||
#endif
|
||||
|
||||
#define MAX_OVERLAY_RECTS 10
|
||||
void app_registerOverlay(const struct LG_OverlayOps * ops, void * params);
|
||||
void app_registerOverlay(const struct LG_OverlayOps * ops, const void * params);
|
||||
void app_initOverlays(void);
|
||||
void app_setOverlay(bool enable);
|
||||
bool app_overlayNeedsRender(void);
|
||||
/**
|
||||
|
@@ -31,8 +31,11 @@ struct LG_OverlayOps
|
||||
/* internal name of the overlay for debugging */
|
||||
const char * name;
|
||||
|
||||
/* called very early to allow for option registration, optional */
|
||||
void (*earlyInit)(void);
|
||||
|
||||
/* called when the overlay is registered */
|
||||
bool (*init)(void ** udata, void * params);
|
||||
bool (*init)(void ** udata, const void * params);
|
||||
|
||||
/* final free */
|
||||
void (*free)(void * udata);
|
||||
|
Reference in New Issue
Block a user