aboutsummaryrefslogtreecommitdiff
path: root/include/egl.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-09-14 01:15:01 +0200
committerdec05eba <dec05eba@protonmail.com>2024-09-14 01:15:01 +0200
commit8acb34638212ab8dba0d48a57dd40721203a7a44 (patch)
tree7f1942c56fa2700f2f5fe2d623e9e1c94fb23324 /include/egl.h
parent992792fb1f35546b9d66c3f69aa3d0f5adb94ef6 (diff)
Set update fps to video fps, on x11 sync video to damage tracking
Diffstat (limited to 'include/egl.h')
-rw-r--r--include/egl.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/egl.h b/include/egl.h
index d9d555a..9e50ad0 100644
--- a/include/egl.h
+++ b/include/egl.h
@@ -156,6 +156,7 @@ typedef struct {
vec2i size;
uint32_t connector_id;
gsr_monitor_rotation rotation;
+ uint32_t monitor_identifier; /* crtc id */
} gsr_x11_output;
typedef struct {
@@ -163,6 +164,7 @@ typedef struct {
Window window;
gsr_x11_output outputs[GSR_MAX_OUTPUTS];
int num_outputs;
+ XEvent xev;
} gsr_x11;
typedef struct {
@@ -311,10 +313,12 @@ struct gsr_egl {
bool gsr_egl_load(gsr_egl *self, Display *dpy, bool wayland, bool is_monitor_capture);
void gsr_egl_unload(gsr_egl *self);
-void gsr_egl_update(gsr_egl *self);
+/* Returns true if an event is available */
+bool gsr_egl_update(gsr_egl *self);
/* Does opengl swap with egl or glx, depending on which one is active */
void gsr_egl_swap_buffers(gsr_egl *self);
-gsr_display_server gsr_egl_get_display_server(const gsr_egl *egl);
+gsr_display_server gsr_egl_get_display_server(const gsr_egl *self);
+XEvent* gsr_egl_get_event_data(gsr_egl *self);
#endif /* GSR_EGL_H */