From 03db326c64b246974d9cfaba02406d7bd77d8c37 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 5 Feb 2014 08:02:06 -0600 Subject: Expansion of vibrate options Improve location / timing of vibration Split out vibrate settings for buttons, keyboard, and long actions Change-Id: I282825cc5f3e44ed6dcabe65dc1f4cb21b407b67 --- gui/keyboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/keyboard.cpp') diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp index 97a980a4e..36106c7c1 100644 --- a/gui/keyboard.cpp +++ b/gui/keyboard.cpp @@ -389,7 +389,6 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) switch (state) { case TOUCH_START: - DataManager::Vibrate("tw_vibrate"); if (GetSelection(x, y) == 0) { startSelection = -1; was_held = 0; @@ -421,7 +420,6 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) if (highlightRenderCount != 0) mRendered = false; highlightRenderCount = 0; - DataManager::Vibrate("tw_vibrate"); startSelection = 0; } break; @@ -478,6 +476,7 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) startSelection = 0; break; } else if (state == TOUCH_RELEASE && was_held == 0) { + DataManager::Vibrate("tw_keyboard_vibrate"); if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key > 0) { // Regular key PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key); @@ -503,6 +502,7 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key); } else if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey > 0) { // Long Press Key + DataManager::Vibrate("tw_keyboard_vibrate"); PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey); } } else if (state == TOUCH_REPEAT) { -- cgit v1.2.3