From 30f61f064234deae5f11fc3be650a23c4a2eb85f Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Tue, 2 Jan 2018 13:20:06 +0000 Subject: [PATCH] Fix bug with GL Context initialisation We now have a working example! Signed-off-by: Mahyar Koshkouei --- mpv-libretro.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mpv-libretro.c b/mpv-libretro.c index 594d504..1cde0fd 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -152,7 +152,7 @@ static void context_reset(void) // The OpenGL API is somewhat separate from the normal mpv API. This only // returns NULL if no OpenGL support is compiled. - mpv_opengl_cb_context *mpv_gl = mpv_get_sub_api(mpv, MPV_SUB_API_OPENGL_CB); + mpv_gl = mpv_get_sub_api(mpv, MPV_SUB_API_OPENGL_CB); if(!mpv_gl) { @@ -271,7 +271,8 @@ static void audio_callback(void) void retro_run(void) { - audio_callback(); + /* TODO: Implement an audio callback feature in to libmpv */ + //audio_callback(); mpv_opengl_cb_draw(mpv_gl, hw_render.get_current_framebuffer(), 320, 240); video_cb(RETRO_HW_FRAME_BUFFER_VALID, 320, 240, 0);