فهرست منبع

Revert "Fixed typo in file, more frameworking for new hmd"

This reverts commit 8b803e53fc0113dbe20cc2bdcc14d04bcd1158c7.
Should not have been pushed to master.
TheOnlyJoey 9 سال پیش
والد
کامیت
adf94447f5
6فایلهای تغییر یافته به همراه4 افزوده شده و 46 حذف شده
  1. 0 13
      CMakeLists.txt
  2. 0 13
      configure.ac
  3. 0 11
      src/Makefile.am
  4. 0 0
      src/drv_secret_hmd_one/secret-hmd-one.c
  5. 4 8
      src/openhmd.c
  6. 0 1
      src/openhmdi.h

+ 0 - 13
CMakeLists.txt

@@ -26,7 +26,6 @@ set(openhmd_source_files
 )
 
 OPTION(OPENHMD_DRIVER_OCULUS_RIFT "Oculus Rift DK1 and DK2" ON)
-OPTION(OPENHMD_DRIVER_SECRET_HMD_ONE "Secret HMD 1 driver" ON)
 OPTION(OPENHMD_DRIVER_EXTERNAL "External sensor driver" ON)
 OPTION(OPENHMD_DRIVER_ANDROID "General Android driver" OFF)
 
@@ -42,18 +41,6 @@ if(OPENHMD_DRIVER_OCULUS_RIFT)
 	set(LIBS ${LIBS} ${HIDAPI_LIBRARIES})
 endif(OPENHMD_DRIVER_OCULUS_RIFT)
 
-if(OPENHMD_DRIVER_OCULUS_RIFT)
-	set(openhmd_source_files ${openhmd_source_files} 
-	${CMAKE_CURRENT_LIST_DIR}/src/drv_secret_hmd_one/secret_hmd_one.c
-	${CMAKE_CURRENT_LIST_DIR}/src/drv_secret_hmd_one/packet.c
-	)
-	add_definitions(-DDRIVER_SECRET_HMD_ONE)
-
-	find_package(HIDAPI REQUIRED)
-	include_directories(${HIDAPI_INCLUDE_DIRS})
-	set(LIBS ${LIBS} ${HIDAPI_LIBRARIES})
-endif(OPENHMD_DRIVER_SECRET_HMD_ONE)
-
 if (OPENHMD_DRIVER_EXTERNAL)
 	set(openhmd_source_files ${openhmd_source_files} 
 	${CMAKE_CURRENT_LIST_DIR}/src/drv_external/external.c

+ 0 - 13
configure.ac

@@ -40,15 +40,6 @@ AC_ARG_ENABLE([driver-oculus-rift],
 
 AM_CONDITIONAL([BUILD_DRIVER_OCULUS_RIFT], [test "x$driver_oculus_rift_enabled" != "xno"])
 
-# Secret HMD One Driver
-AC_ARG_ENABLE([driver-secret-hmd-one],
-        [AS_HELP_STRING([--disable-driver-secret-hmd-one],
-                [disable building of secret-hmd-one driver [default=yes]])],
-        [driver_secret_hmd_one_enabled=$enableval],
-        [driver_secret_hmd_one_enabled='yes'])
-
-AM_CONDITIONAL([BUILD_DRIVER_SECRET_HMD_ONE], [test "x$driver_secret_hmd_one_enabled" != "xno"])
-
 # External Driver
 AC_ARG_ENABLE([driver-external],
         [AS_HELP_STRING([--disable-driver-external],
@@ -71,10 +62,6 @@ AM_CONDITIONAL([BUILD_DRIVER_ANDROID], [test "x$driver_android_enabled" != "xno"
 AS_IF([test "x$driver_oculus_rift_enabled" != "xno"],
 	[PKG_CHECK_MODULES([hidapi], [$hidapi] >= 0.0.5)])
 
-# Libs required by secret-hmd-one Driver
-AS_IF([test "x$driver_secret_hmd_one_enabled" != "xno"],
-	[PKG_CHECK_MODULES([hidapi], [$hidapi] >= 0.0.5)])
-
 # Do we build OpenGL example?
 AC_ARG_ENABLE([openglexample],
         [AS_HELP_STRING([--enable-openglexample],

+ 0 - 11
src/Makefile.am

@@ -25,17 +25,6 @@ libopenhmd_la_LDFLAGS += $(hidapi_LIBS)
 
 endif
 
-if BUILD_DRIVER_SECRET_HMD_ONE
-
-libopenhmd_la_SOURCES += \
-	drv_secret_hmd_one/secret_hmd_one.c \
-	drv_secret_hmd_one/packet.c
-
-libopenhmd_la_CPPFLAGS += $(hidapi_CFLAGS) -DDRIVER_SECRET_HMD_ONE
-libopenhmd_la_LDFLAGS += $(hidapi_LIBS)
-
-endif
-
 if BUILD_DRIVER_EXTERNAL
 
 libopenhmd_la_SOURCES += \

src/drv_secret_hmd_one/secret_hmd_one.c → src/drv_secret_hmd_one/secret-hmd-one.c


+ 4 - 8
src/openhmd.c

@@ -27,10 +27,6 @@ ohmd_context* OHMD_APIENTRY ohmd_ctx_create(void)
 	ctx->drivers[ctx->num_drivers++] = ohmd_create_oculus_rift_drv(ctx);
 #endif
 
-#if DRIVER_SECRET_HMD_ONE
-	ctx->drivers[ctx->num_drivers++] = ohmd_create_secret_hmd_one_drv(ctx);
-#endif
-
 #if DRIVER_EXTERNAL
 	ctx->drivers[ctx->num_drivers++] = ohmd_create_external_drv(ctx);
 #endif
@@ -72,7 +68,7 @@ void OHMD_APIENTRY ohmd_ctx_update(ohmd_context* ctx)
 		ohmd_device* dev = ctx->active_devices[i];
 		if(!dev->settings.automatic_update && dev->update)
 			dev->update(dev);
-
+	
 		ohmd_lock_mutex(ctx->update_mutex);
 		dev->getf(dev, OHMD_POSITION_VECTOR, (float*)&dev->position);
 		dev->getf(dev, OHMD_ROTATION_QUAT, (float*)&dev->rotation);
@@ -115,7 +111,7 @@ const char* OHMD_APIENTRY ohmd_list_gets(ohmd_context* ctx, int index, ohmd_stri
 static unsigned int ohmd_update_thread(void* arg)
 {
 	ohmd_context* ctx = (ohmd_context*)arg;
-
+	
 	while(!ctx->update_request_quit)
 	{
 		ohmd_lock_mutex(ctx->update_mutex);
@@ -124,7 +120,7 @@ static unsigned int ohmd_update_thread(void* arg)
 			if(ctx->active_devices[i]->settings.automatic_update && ctx->active_devices[i]->update)
 				ctx->active_devices[i]->update(ctx->active_devices[i]);
 		}
-
+		
 		ohmd_unlock_mutex(ctx->update_mutex);
 
 		ohmd_sleep(AUTOMATIC_UPDATE_SLEEP);
@@ -201,7 +197,7 @@ OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_close_device(ohmd_device* device)
 
 	for(int i = idx; i < ctx->num_active_devices; i++)
 		ctx->active_devices[i]->active_device_idx--;
-
+	
 	ohmd_unlock_mutex(device->ctx->update_mutex);
 
 	return OHMD_S_OK;

+ 0 - 1
src/openhmdi.h

@@ -126,7 +126,6 @@ void ohmd_calc_default_proj_matrices(ohmd_device_properties* props);
 // drivers
 ohmd_driver* ohmd_create_dummy_drv(ohmd_context* ctx);
 ohmd_driver* ohmd_create_oculus_rift_drv(ohmd_context* ctx);
-ohmd_driver* ohmd_create_secret_hmd_one_drv(ohmd_context* ctx);
 ohmd_driver* ohmd_create_external_drv(ohmd_context* ctx);
 ohmd_driver* ohmd_create_android_drv(ohmd_context* ctx);