video: return -EOPNOTSUPP in video_use without OpenGL
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 24 Jun 2012 08:31:34 +0000 (10:31 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 24 Jun 2012 08:31:34 +0000 (10:31 +0200)
If OpenGL is not supported, we should _not_ return 0. Otherwise, there is
not convenient way to detect this scenario.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/uterm_internal.h

index 04939b7..8fa5338 100644 (file)
@@ -297,7 +297,7 @@ static inline bool video_need_hotplug(const struct uterm_video *video)
 
 static inline int video_do_use(struct uterm_video *video)
 {
-       return VIDEO_CALL(video->ops->use, 0, video);
+       return VIDEO_CALL(video->ops->use, -EOPNOTSUPP, video);
 }
 
 static inline bool input_bit_is_set(const unsigned long *array, int bit)