Skip to content

Commit 7d38c5a

Browse files
author
sparks
committed
Resolve build issues for win32/wine systems
1 parent ebd470e commit 7d38c5a

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

video/out/gpu_next/context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ void gpu_ctx_destroy(struct gpu_ctx **ctxp)
253253
*ctxp = NULL;
254254
}
255255

256-
#if HAVE_GL
256+
#if HAVE_GL && defined(PL_HAVE_OPENGL)
257257
/**
258258
* @brief Callback to make the OpenGL context current.
259259
* @param priv Pointer to the private data (mpv_opengl_init_params).

video/out/gpu_next/libmpv_gpu_next.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ struct priv {
2121
* List of available API context implementations (e.g., GL, Vulkan - currently only OpenGL)
2222
*/
2323
static const struct libmpv_gpu_next_context_fns *context_backends[] = {
24+
#if HAVE_GL && defined(PL_HAVE_OPENGL)
2425
&libmpv_gpu_next_context_gl,
26+
#endif
2527
NULL
2628
};
2729

@@ -273,23 +275,6 @@ static void perfdata(struct render_backend *ctx,
273275
{
274276
}
275277

276-
/*
277-
* @brief Initializes the render_backend.
278-
* @param ctx The render_backend context.
279-
* @return 0 on success, negative error code on failure.
280-
*/
281-
static int init(struct render_backend *ctx)
282-
{
283-
struct priv *p = ctx->priv;
284-
if (!p) return MPV_ERROR_UNINITIALIZED;
285-
286-
// Initialize the video engine.
287-
p->video_engine = pl_video_create(p->context);
288-
if (!p->video_engine) return MPV_ERROR_GENERIC;
289-
290-
return 0;
291-
}
292-
293278
const struct render_backend_fns render_backend_gpu_next = {
294279
.init = init,
295280
.destroy = destroy,

0 commit comments

Comments
 (0)