From a409645cd3e2b8f0cc67541a9e4c88bf2cd96a79 Mon Sep 17 00:00:00 2001 From: mwturvey Date: Wed, 15 Mar 2017 15:31:17 -0700 Subject: Building & basic running --- src/survive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/survive.c') diff --git a/src/survive.c b/src/survive.c index 1b5bed1..2982a4f 100755 --- a/src/survive.c +++ b/src/survive.c @@ -14,7 +14,8 @@ static int did_runtime_symnum; int SymnumCheck( const char * path, const char * name, void * location, long size ) { - if( strncmp( name, "REGISTER", 8 ) == 0 ) + printf("%s\n", name); + if( strncmp( name, "LTRegister", 8 ) == 0 ) { typedef void (*sf)(); sf fn = (sf)location; -- cgit v1.2.3 From fa0f4825937ed93163bb2cd165c001d7444d8928 Mon Sep 17 00:00:00 2001 From: mwturvey Date: Thu, 16 Mar 2017 10:31:19 -0700 Subject: Last try at getting linktime registration working under MSVC --- src/survive.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/survive.c') diff --git a/src/survive.c b/src/survive.c index 2982a4f..c2b2940 100755 --- a/src/survive.c +++ b/src/survive.c @@ -47,6 +47,17 @@ SurviveContext * survive_init( int headless ) did_runtime_symnum = 1; } #endif +//#ifdef MANUAL_REGISTRATION +// // note: this manual registration is currently only in use on builds using Visual Studio. +// +//#define MANUAL_DRIVER_REGISTRATION(func) int func( SurviveObject * so, PoserData * pd ); RegisterDriver( #func, &func); +// +// MANUAL_DRIVER_REGISTRATION(PoserCharlesSlow) +// MANUAL_DRIVER_REGISTRATION(PoserDaveOrtho) +// MANUAL_DRIVER_REGISTRATION(PoserDummy) +// MANUAL_DRIVER_REGISTRATION(DriverRegHTCVive) +// +//#endif int r = 0; int i = 0; -- cgit v1.2.3 From 27c9edd889c746e818dc3aa55971d9cd6d8595a7 Mon Sep 17 00:00:00 2001 From: mwturvey Date: Thu, 16 Mar 2017 10:32:18 -0700 Subject: Manual registration on Windows --- src/survive.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/survive.c') diff --git a/src/survive.c b/src/survive.c index c2b2940..d7aa691 100755 --- a/src/survive.c +++ b/src/survive.c @@ -47,17 +47,17 @@ SurviveContext * survive_init( int headless ) did_runtime_symnum = 1; } #endif -//#ifdef MANUAL_REGISTRATION -// // note: this manual registration is currently only in use on builds using Visual Studio. -// -//#define MANUAL_DRIVER_REGISTRATION(func) int func( SurviveObject * so, PoserData * pd ); RegisterDriver( #func, &func); -// -// MANUAL_DRIVER_REGISTRATION(PoserCharlesSlow) -// MANUAL_DRIVER_REGISTRATION(PoserDaveOrtho) -// MANUAL_DRIVER_REGISTRATION(PoserDummy) -// MANUAL_DRIVER_REGISTRATION(DriverRegHTCVive) -// -//#endif +#ifdef MANUAL_REGISTRATION + // note: this manual registration is currently only in use on builds using Visual Studio. + +#define MANUAL_DRIVER_REGISTRATION(func) int func( SurviveObject * so, PoserData * pd ); RegisterDriver( #func, &func); + + MANUAL_DRIVER_REGISTRATION(PoserCharlesSlow) + MANUAL_DRIVER_REGISTRATION(PoserDaveOrtho) + MANUAL_DRIVER_REGISTRATION(PoserDummy) + MANUAL_DRIVER_REGISTRATION(DriverRegHTCVive) + +#endif int r = 0; int i = 0; -- cgit v1.2.3 From d9c9ebe6de1e6f255d645dd6e641f2c288238bc2 Mon Sep 17 00:00:00 2001 From: mwturvey Date: Thu, 16 Mar 2017 10:42:56 -0700 Subject: fix linux build --- src/survive.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/survive.c') diff --git a/src/survive.c b/src/survive.c index d7aa691..9d0ef01 100755 --- a/src/survive.c +++ b/src/survive.c @@ -14,8 +14,7 @@ static int did_runtime_symnum; int SymnumCheck( const char * path, const char * name, void * location, long size ) { - printf("%s\n", name); - if( strncmp( name, "LTRegister", 8 ) == 0 ) + if( strncmp( name, "REGISTER", 8 ) == 0 ) { typedef void (*sf)(); sf fn = (sf)location; -- cgit v1.2.3