28#if !defined( __WINDOWS__ )
35#if !defined( __WINDOWS__ )
57#if !defined( __WINDOWS__ )
69 struct sigaction newAction;
72 sigemptyset( &newAction.sa_mask );
73 newAction.sa_flags = 0;
82 wxLogWarning( wxT(
"3Dconnexion driver crashed during initialization. "
83 "SpaceMouse support will be disabled for this session." ) );
95 catch(
const std::exception& e )
98 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ),
99 wxT(
"3Dconnexion initialization failed: %s" ), e.what() );
105 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ),
106 wxT(
"3Dconnexion initialization failed with unknown exception" ) );
117 catch(
const std::exception& e )
119 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ),
120 wxT(
"3Dconnexion initialization failed: %s" ), e.what() );
125 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ),
126 wxT(
"3Dconnexion initialization failed with unknown exception" ) );
static std::mutex s_initMutex
static sigjmp_buf s_jumpBuffer
static void navlibSigAbrtHandler(int aSignal)
bool SafeNavlibInit(const std::function< void()> &aInitFunc)
Attempt to run the given function, recovering from both C++ exceptions and abort() calls triggered by...
bool NavlibDriverCrashed()
Returns true if a previous SafeNavlibInit call detected a driver crash.
static std::atomic< bool > s_driverCrashed(false)
static struct sigaction s_savedSigAbrtAction
Safe initialization wrapper for the 3Dconnexion navlib SDK.