OpenXR - Resuming renderer fixed, haptics support added

This commit is contained in:
Lubos committed 2022-08-16 16:47:31 +02:00
1 parent 382df469c1
commit 92d631966f
5 files changed
+25 -11

No files matched your search

+6 -6
View File
@@ -59,18 +59,18 @@ XrTime ToXrTime(const double timeInSeconds) {
return (timeInSeconds * 1e9);
}
void VR_Vibrate( int duration, int chan, float intensity ) {
void INVR_Vibrate( int duration, int chan, float intensity ) {
for (int i = 0; i < 2; ++i) {
int channel = (i + 1) & chan;
int channel = i & chan;
if (channel) {
if (vibration_channel_duration[channel-1] > 0.0f)
if (vibration_channel_duration[channel] > 0.0f)
return;
if (vibration_channel_duration[channel-1] == -1.0f && duration != 0.0f)
if (vibration_channel_duration[channel] == -1.0f && duration != 0.0f)
return;
vibration_channel_duration[channel-1] = duration;
vibration_channel_intensity[channel-1] = intensity;
vibration_channel_duration[channel] = duration;
vibration_channel_intensity[channel] = intensity;
}
}
}