From a087915c5dd8c356911453a019723ebaa9904a36 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Wed, 8 Mar 2017 00:53:28 -0500 Subject: Move most of the libsurvive stuff into a common area. --- src/survive_driverman.h | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/survive_driverman.h') diff --git a/src/survive_driverman.h b/src/survive_driverman.h index 5e13caf..216333a 100644 --- a/src/survive_driverman.h +++ b/src/survive_driverman.h @@ -10,29 +10,13 @@ #ifndef SURVIVE_DRIVERMAN_H #define SURVIVE_DRIVERMAN_H -//Driver registration -#define MAX_DRIVERS 32 - -void RegisterDriver( const char * name, void * data ); -void * GetDriver( const char * name ); -const char * GetDriverNameMatching( const char * prefix, int place ); -void ListDrivers(); - -#define REGISTER_LINKTIME( func ) \ - void __attribute__((constructor)) Register##func() { RegisterDriver( #func, &func ); } - +#include "survive.h" -// -// Specific types of drivers. -// - -struct SurviveContext; +//Very little here. Mostly included in survive.h. -//Device drivers (prefix your drivers with "DriverReg") i.e. -// REGISTER_LINKTIME( DriverRegHTCVive ); -typedef int (*DeviceDriver)( struct SurviveContext * ctx ); +//Driver registration +#define MAX_DRIVERS 32 -//more driver types here? i.e. posefinders, etc. #endif -- cgit v1.2.3 From 2a4a803b2f162692ca11e700b32da0a77049bfd2 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Wed, 8 Mar 2017 01:01:42 -0500 Subject: cleaning up more header stuff --- src/survive_driverman.h | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/survive_driverman.h (limited to 'src/survive_driverman.h') diff --git a/src/survive_driverman.h b/src/survive_driverman.h deleted file mode 100644 index 216333a..0000000 --- a/src/survive_driverman.h +++ /dev/null @@ -1,22 +0,0 @@ -// (C) 2017 <>< C. N. Lohr, Under MIT/x11 License. -// -// This file is intended to be used for self-registering functions. By using -// this it means that you do not need to have complicated switch statements or -// #defines for dfferent inclusion of drivers/other code. You can simply -// register your function and it will be put into a list. -// -// - -#ifndef SURVIVE_DRIVERMAN_H -#define SURVIVE_DRIVERMAN_H - -#include "survive.h" - -//Very little here. Mostly included in survive.h. - -//Driver registration -#define MAX_DRIVERS 32 - - -#endif - -- cgit v1.2.3