conworlds
diff src/vr/vr_libovr.c @ 6:3c36bc28c6c2
more stuff in the vr test
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 21 Aug 2014 01:08:03 +0300 |
parents | 8b7da5ab814e |
children | bd8202d6d28d |
line diff
1.1 --- a/src/vr/vr_libovr.c Wed Aug 20 16:34:43 2014 +0300 1.2 +++ b/src/vr/vr_libovr.c Thu Aug 21 01:08:03 2014 +0300 1.3 @@ -4,9 +4,11 @@ 1.4 1.5 #include <stdio.h> 1.6 #include <stdlib.h> 1.7 +#include "vr_impl.h" 1.8 + 1.9 +#ifdef USE_LIBOVR 1.10 #include <OVR_CAPI.h> 1.11 #include <OVR_CAPI_GL.h> 1.12 -#include "vr_impl.h" 1.13 1.14 static ovrHmd hmd; 1.15 1.16 @@ -105,3 +107,23 @@ 1.17 } 1.18 return &m; 1.19 } 1.20 + 1.21 +#else /* no libovr */ 1.22 + 1.23 +static int init(void) 1.24 +{ 1.25 + return -1; 1.26 +} 1.27 + 1.28 +struct vr_module *vr_module_libovr(void) 1.29 +{ 1.30 + static struct vr_module m; 1.31 + 1.32 + if(!m.init) { 1.33 + m.name = "libovr"; 1.34 + m.init = init; 1.35 + } 1.36 + return &m; 1.37 +} 1.38 + 1.39 +#endif /* USE_LIBOVR */