Пример #1
Файл: ovr.go Проект: postfix/ovr
// The ovrHmd_GetLastError function has a bug, where it sends back an empty
// string when there is no error, instead of NULL. Work around that.
func (hmd *Hmd) GetLastError() *string {
	if str := C.ovrHmd_GetLastError(hmd.hmdRef); str != nil && C.strlen(str) != 0 {
		goStr := C.GoString(str)
		return &goStr

	return nil
Пример #2
// Returns last error for HMD state. Returns null for no error.
// String is valid until next call or GetLastError or HMD is destroyed.
// Pass null hmd to get global error (for create, etc).
func (this *Hmd) GetLastError() string {
	return C.GoString(C.ovrHmd_GetLastError(this.cptr()))