mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2024-11-10 06:52:10 +00:00
Remove external haptics menu option
if it is present, then it will be used, no need for a toggle
This commit is contained in:
parent
a5228fab96
commit
035881dbdd
5 changed files with 4 additions and 23 deletions
|
@ -881,12 +881,9 @@ 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);
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
Loading…
Reference in a new issue