summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostNaN <GhostNaN@protonmail.com>2020-08-08 02:21:47 -0400
committerGhostNaN <GhostNaN@protonmail.com>2020-08-08 02:21:47 -0400
commit21bb932ffb7bcd87397637c281eeb32ef92d0a6e (patch)
tree25215dd30cdea698d2e24ac5d3e719fd13fd7b8d
parent9ebb7e431136aafbfe66a21724f824ae3d2aa8f3 (diff)
Swapped out OpenGL loader and modified init mpv event timings
-rw-r--r--src/paper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/paper.c b/src/paper.c
index ae9a0e2..0074e46 100644
--- a/src/paper.c
+++ b/src/paper.c
@@ -222,7 +222,7 @@ int paper_init(char* _monitor, char* video_path, int verbose, char* layer_name)
EGLSurface egl_surface = eglCreatePlatformWindowSurface(egl_display, config, window, NULL);
eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_ctx);
- gladLoadGL();
+ gladLoadGLLoader((GLADloadproc) eglGetProcAddress);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glViewport(0, 0, output->width, output->height);
@@ -257,9 +257,9 @@ int paper_init(char* _monitor, char* video_path, int verbose, char* layer_name)
// Play this file.
const char* cmd[] = {"loadfile", video_path, NULL};
mpv_command_async(mpv, 0, cmd);
- mpv_event* event = mpv_wait_event(mpv, 0);
+ mpv_event* event = mpv_wait_event(mpv, 1);
while (event->event_id != MPV_EVENT_START_FILE){
- event = mpv_wait_event(mpv, 0);
+ event = mpv_wait_event(mpv, 1);
}
if (verbose) {
printf("Loaded %s\n", video_path);