summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
authorrr- <mkurczew@gmail.com>2015-11-07 21:11:04 +0100
committerwm4 <wm4@nowhere>2015-11-08 15:00:15 +0100
commit62f261a7b82922bce32eeaff9d1ab1b6c660598c (patch)
tree5c989f20e4b951bc92f58fdb745f2c40885d00ae /video/out/opengl
parentc3f2ef5491dc28d1f2f68d024b4be01c27b029e7 (diff)
downloadmpv-62f261a7b82922bce32eeaff9d1ab1b6c660598c.tar.bz2
mpv-62f261a7b82922bce32eeaff9d1ab1b6c660598c.tar.xz
vo_drm: use bool rather than integer return values
Since the errors weren't used for anything other than simple success/fail checks, I simplified things a bit.
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/drm_egl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/opengl/drm_egl.c b/video/out/opengl/drm_egl.c
index 696785d975..a54467e235 100644
--- a/video/out/opengl/drm_egl.c
+++ b/video/out/opengl/drm_egl.c
@@ -313,7 +313,7 @@ static int drm_egl_init(struct MPGLContext *ctx, int flags)
p->ev.version = DRM_EVENT_CONTEXT_VERSION;
p->ev.page_flip_handler = page_flipped;
- p->vt_switcher_active = vt_switcher_init(&p->vt_switcher, ctx->vo->log) == 0;
+ p->vt_switcher_active = vt_switcher_init(&p->vt_switcher, ctx->vo->log);
if (p->vt_switcher_active) {
vt_switcher_acquire(&p->vt_switcher, acquire_vt, ctx);
vt_switcher_release(&p->vt_switcher, release_vt, ctx);
@@ -329,8 +329,7 @@ static int drm_egl_init(struct MPGLContext *ctx, int flags)
}
// TODO: arguments should be configurable
- int ret = kms_setup(p->kms, "/dev/dri/card0", -1, 0);
- if (ret) {
+ if (!kms_setup(p->kms, "/dev/dri/card0", -1, 0)) {
MP_ERR(ctx->vo, "Failed to configure KMS.\n");
return -1;
}