Remove external haptics menu option

if it is present, then it will be used, no need for a toggle
This commit is contained in:
Simon 2021-05-10 22:03:26 +01:00
parent a5228fab96
commit 035881dbdd
5 changed files with 4 additions and 23 deletions

View file

@ -881,13 +881,10 @@ void jni_haptic_stopevent(const char* event);
void jni_haptic_enable();
void jni_haptic_disable();
bool bHapticsEnabled = false; // local knowledge of whether bHaptics is enabled or not
void QzDoom_HapticEvent(const char* event, int position, int intensity, float angle, float yHeight )
{
if (bHapticsEnabled) {
jni_haptic_event(event, position, intensity, angle, yHeight);
}
}
void QzDoom_HapticStopEvent(const char* event)
{
@ -896,13 +893,11 @@ void QzDoom_HapticStopEvent(const char* event)
void QzDoom_HapticEnable()
{
bHapticsEnabled = true;
jni_haptic_enable();
}
void QzDoom_HapticDisable()
{
bHapticsEnabled = false;
jni_haptic_disable();
}

View file

@ -70,7 +70,6 @@ EXTERN_CVAR(Bool, vr_teleport);
EXTERN_CVAR(Bool, vr_switch_sticks);
EXTERN_CVAR(Bool, vr_secondary_button_mappings);
EXTERN_CVAR(Bool, vr_two_handed_weapons);
EXTERN_CVAR (Bool, vr_bhaptics)
//HUD control
EXTERN_CVAR(Float, vr_hud_scale);
@ -435,12 +434,11 @@ namespace s3d
QzDoom_FrameSetup();
if (vr_bhaptics)
static bool enabled = false;
if (!enabled)
{
enabled = true;
QzDoom_HapticEnable();
} else
{
QzDoom_HapticDisable();
}
if (shutdown)

View file

@ -76,16 +76,6 @@ CVAR(Bool, vr_momentum, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // Only used in
CVAR(Float, vr_pickup_haptic_level, 0.2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_quake_haptic_level, 0.8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Bool, vr_bhaptics, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
if (self)
{
QzDoom_HapticEnable();
} else
{
QzDoom_HapticDisable();
}
}
//HUD control
CVAR(Float, vr_hud_scale, 0.25f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

View file

@ -2345,8 +2345,6 @@ OptionMenu VROptionsMenu protected
StaticText "Haptics"
Slider "Item Pickup Haptic Level", "vr_pickup_haptic_level", 0.0, 1.0, 0.1, 2
Slider "Quake Haptic Level", "vr_quake_haptic_level", 0.0, 1.0, 0.1, 2
StaticText ""
Option "bHaptics Support", "vr_bhaptics", "OnOff"
StaticText ""
StaticText "Weapon"

Binary file not shown.