diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2019-03-13 00:28:31 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2019-03-18 04:39:00 +0100 |
commit | 3ed778ad6389c901077fee38bb77abd55dd4eba4 (patch) | |
tree | 57a2a9af729ca594387f71532797fb9d42bcc8cc /data.cpp | |
parent | fix building TWRP for devices without cache (diff) | |
download | android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.gz android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.bz2 android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.lz android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.xz android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.zst android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.zip |
Diffstat (limited to 'data.cpp')
-rwxr-xr-x[-rw-r--r--] | data.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/data.cpp b/data.cpp index d9239a473..cf8349ba8 100644..100755 --- a/data.cpp +++ b/data.cpp @@ -587,9 +587,16 @@ void DataManager::SetDefaultValues() mConst.SetValue("false", "0"); mConst.SetValue(TW_VERSION_VAR, TW_VERSION_STR); + +#ifndef TW_NO_HAPTICS mPersist.SetValue("tw_button_vibrate", "80"); mPersist.SetValue("tw_keyboard_vibrate", "40"); mPersist.SetValue("tw_action_vibrate", "160"); + mConst.SetValue("tw_disable_haptics", "0"); +#else + LOGINFO("TW_NO_HAPTICS := true\n"); + mConst.SetValue("tw_disable_haptics", "1"); +#endif TWPartition *store = PartitionManager.Get_Default_Storage_Partition(); if (store) @@ -1110,9 +1117,11 @@ string DataManager::GetSettingsStoragePath(void) void DataManager::Vibrate(const string& varName) { +#ifndef TW_NO_HAPTICS int vib_value = 0; GetValue(varName, vib_value); if (vib_value) { vibrate(vib_value); } +#endif } |