Example #1
0
File: ovr.go Project: postfix/ovr
// The ovrHmd_GetLatencyTestResult function has a bug, where it sends back an
// empty string when there is no error, instead of a NULL. Work around that.
func (hmd *Hmd) GetLatencyTestResult() *string {
	if str := C.ovrHmd_GetLatencyTestResult(hmd.hmdRef); str != nil && C.strlen(str) != 0 {
		goStr := C.GoString(str)
		return &goStr
	}

	return nil
}
Example #2
0
File: ovr.go Project: krux02/libovr
// Returns non-null string once with latency test result, when it is available.
// Buffer is valid until next call.
func (hmd *Hmd) GetLatencyTestResult() string {
	return C.GoString(C.ovrHmd_GetLatencyTestResult(hmd.cptr()))
}