Skip to content

Commit d42d323

Browse files
committed
Update
1 parent 1b74c66 commit d42d323

4 files changed

Lines changed: 19 additions & 10 deletions

File tree

README.RU.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ TrueOpenVR - это открытый VR стандарт, сделанный в
3434
## Поддерживаемое оборудование
3535
- Дисплеи в расширенном режиме (поддержка прямого вывода в планах).
3636
- Трекеры: PSMoveService (частичная поддержка), FreeTrack, Razor IMU, Arduino, Android.
37+
- Контроллеры: Razer Hydra.
3738

3839
## Планы на будущее:
3940
- Примеры работы с профилями искажения изображения линз.
@@ -44,7 +45,7 @@ TrueOpenVR - это открытый VR стандарт, сделанный в
4445

4546
- Поддержка VR шлемов (PlayStation VR и так далее).
4647

47-
- Поддержка контроллеров (Razer Hydra, PS Move, Daydream).
48+
- Поддержка контроллеров (PS Move, Daydream).
4849

4950
## Загрузка
5051
>Версия для Windows 7, 8.1, 10

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ TrueOpenVR is an open VR standard, made in accordance with the concept of "Plug
3434
## Supported equipment
3535
- Displays in extended mode (support for direct mode in plans).
3636
- Trackers: PSMoveService (partial support), FreeTrack, Razor IMU, Arduino, Android.
37+
- Controllers: Razer Hydra.
3738

3839
## Future plans:
3940
- Work samples with lens distortion image profiles.
@@ -44,7 +45,7 @@ TrueOpenVR is an open VR standard, made in accordance with the concept of "Plug
4445

4546
- Support VR HMD (PlayStation VR and etc).
4647

47-
- Support controllers (Razer Hydra, PS Move, Daydream).
48+
- Support controllers (PS Move, Daydream).
4849

4950
## Download
5051
>Version for Windows 7, 8.1, 10

TOVR/C++/TOVR.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ typedef struct _Controller
3131
SHORT ThumbY;
3232
} TController, *PController;
3333

34+
#define TOVR_SUCCESS 1
35+
#define TOVR_FAILURE 0
36+
3437
typedef DWORD(__stdcall *_GetHMDData)(__out THMD *myHMD);
3538
typedef DWORD(__stdcall *_GetControllersData)(__out TController *myController, __out TController *myController2);
3639
typedef DWORD(__stdcall *_SetControllerData)(__in int dwIndex, __in WORD MotorSpeed);
@@ -123,7 +126,7 @@ DLLEXPORT DWORD __stdcall GetHMDData(__out THMD *myHMD)
123126
myHMD->Pitch = 0;
124127
myHMD->Roll = 0;
125128

126-
return 0;
129+
return TOVR_FAILURE;
127130
}
128131
}
129132

@@ -159,7 +162,7 @@ DLLEXPORT DWORD __stdcall GetControllersData(__out TController *myController, __
159162
myController2->ThumbX = 0;
160163
myController2->ThumbY = 0;
161164

162-
return 0;
165+
return TOVR_FAILURE;
163166
}
164167
}
165168

@@ -169,7 +172,7 @@ DLLEXPORT DWORD __stdcall SetControllerData(__in int dwIndex, __in WORD MotorSpe
169172
return DriverSetControllerData(dwIndex, MotorSpeed);
170173
}
171174
else {
172-
return 0;
175+
return TOVR_FAILURE;
173176
}
174177
}
175178

@@ -179,6 +182,6 @@ DLLEXPORT DWORD __stdcall SetCentering(__in int dwIndex)
179182
return DriverSetCentering(dwIndex);
180183
}
181184
else {
182-
return 0;
185+
return TOVR_FAILURE;
183186
}
184187
}

TOVR/Delphi/TOVR.dpr

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ type
3535
Controller = _Controller;
3636
TController = Controller;
3737

38+
const
39+
TOVR_SUCCESS = 1;
40+
TOVR_FAILURE = 0;
41+
3842
var
3943
DriverPath: string;
4044
DllHandle: HMODULE;
@@ -58,7 +62,7 @@ begin
5862
myHMD.Pitch:=0;
5963
myHMD.Roll:=0;
6064

61-
Result:=0;
65+
Result:=TOVR_FAILURE;
6266
end;
6367
end;
6468

@@ -93,7 +97,7 @@ begin
9397
myController2.ThumbX:=0;
9498
myController2.ThumbY:=0;
9599

96-
Result:=0;
100+
Result:=TOVR_FAILURE;
97101
end;
98102
end;
99103

@@ -102,15 +106,15 @@ begin
102106
if DllHandle <> 0 then
103107
Result:=DriverSetControllerData(dwIndex, MotorSpeed)
104108
else
105-
Result:=0;
109+
Result:=TOVR_FAILURE;
106110
end;
107111

108112
function SetCentering(dwIndex: integer): DWORD; stdcall;
109113
begin
110114
if DllHandle <> 0 then
111115
Result:=DriverSetCentering(dwIndex)
112116
else
113-
Result:=0;
117+
Result:=TOVR_FAILURE;
114118
end;
115119

116120
procedure GetRegValues;

0 commit comments

Comments
 (0)