Add haptic feedback
Change-Id: I15d723f73c0b0bb4a40645d1c3f4c1c616f36998
This commit is contained in:
committed by
Gerrit Code Review
parent
4011c71f98
commit
71e9b049c2
11
data.cpp
11
data.cpp
@@ -55,7 +55,7 @@ extern "C"
|
||||
#include "twcommon.h"
|
||||
#include "data.h"
|
||||
#include "gui/pages.h"
|
||||
|
||||
#include "minuitwrp/minui.h"
|
||||
void gui_notifyVarChange(const char *name, const char* value);
|
||||
}
|
||||
|
||||
@@ -583,6 +583,7 @@ void DataManager::SetDefaultValues()
|
||||
|
||||
mConstValues.insert(make_pair(TW_VERSION_VAR, TW_VERSION_STR));
|
||||
mValues.insert(make_pair("tw_storage_path", make_pair("/", 1)));
|
||||
mValues.insert(make_pair("tw_vibrate", make_pair("80", 1)));
|
||||
|
||||
#ifdef TW_FORCE_CPUINFO_FOR_DEVICE_ID
|
||||
printf("TW_FORCE_CPUINFO_FOR_DEVICE_ID := true\n");
|
||||
@@ -1240,3 +1241,11 @@ extern "C" void DataManager_ReadSettingsFile(void)
|
||||
{
|
||||
return DataManager::ReadSettingsFile();
|
||||
}
|
||||
void DataManager::Vibrate(const string varName)
|
||||
{
|
||||
int vib_value = 0;
|
||||
GetValue(varName, vib_value);
|
||||
if (vib_value) {
|
||||
vibrate(vib_value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user