Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-libsensors: Commit

hardware/libsensors


Commit MetaInfo

Révision3e697953c0e385164e4713aa5bbfeafbc05e59d6 (tree)
l'heure2011-11-13 16:25:02
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

support rotation keys configuration

Change Summary

Modification

--- a/Android.mk
+++ b/Android.mk
@@ -13,5 +13,13 @@ LOCAL_MODULE_TAGS := optional
1313
1414 ifeq ($(strip $(BOARD_USES_KBDSENSOR)),true)
1515 LOCAL_SRC_FILES := kbdsensor.cpp
16+
17+ifeq ($(strip $(BOARD_USES_KBDSENSOR_ROTKEY1)),true)
18+LOCAL_CFLAGS := -DFN_ROT_0=KEY_F9 -DFN_ROT_90=KEY_F12 -DFN_ROT_180=KEY_F10 -DFN_ROT_270=KEY_F11
19+endif
20+ifeq ($(filter -DFN_ROT_0=%,$(LOCAL_CFLAGS)),)
21+LOCAL_CFLAGS := -DFN_ROT_0=KEY_UP -DFN_ROT_90=KEY_RIGHT -DFN_ROT_180=KEY_DOWN -DFN_ROT_270=KEY_LEFT
22+endif
23+
1624 include $(BUILD_SHARED_LIBRARY)
1725 endif
--- a/kbdsensor.cpp
+++ b/kbdsensor.cpp
@@ -209,16 +209,16 @@ int SensorPollContext::poll_poll(struct sensors_poll_device_t *dev, sensors_even
209209 continue;
210210 rot = ctx->rotation;
211211 break;
212- case KEY_UP:
212+ case FN_ROT_0:
213213 rot = ROT_0;
214214 break;
215- case KEY_RIGHT:
215+ case FN_ROT_90:
216216 rot = ROT_90;
217217 break;
218- case KEY_DOWN:
218+ case FN_ROT_180:
219219 rot = ROT_180;
220220 break;
221- case KEY_LEFT:
221+ case FN_ROT_270:
222222 rot = ROT_270;
223223 break;
224224 #if 0
Afficher sur ancien navigateur de dépôt.