Пример #1
0
Файл: ovr.go Проект: 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
}
Пример #2
0
// 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()))
}