From c1c3bcb3fe176a901fc2c40b9b5a8a2578fc8fe2 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Mon, 20 Oct 2014 02:17:57 -0400 Subject: [PATCH] fix: various fixes for kindle dxg --- Makefile | 10 +++++----- README.md | 2 +- base | 2 +- frontend/ui/device.lua | 4 ++-- frontend/ui/input.lua | 1 + 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d0247c0e7..426712d32 100644 --- a/Makefile +++ b/Makefile @@ -112,6 +112,10 @@ clean: rm -rf $(INSTALL_DIR) $(MAKE) -C $(KOR_BASE) clean +# Don't bundle launchpad on touch devices.. +ifeq ($(TARGET), kindle-legacy) +KINDLE_LEGACY_LAUNCHER:=launchpad +endif kindleupdate: all # ensure that the binaries were built for ARM file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1 @@ -124,11 +128,7 @@ kindleupdate: all ln -sf ../../$(KINDLE_DIR)/libkohelper.sh $(INSTALL_DIR)/koreader ln -sf ../../$(KINDLE_DIR)/kotar_cpoint $(INSTALL_DIR)/koreader # create new package - # Don't bundle launchpad on touch devices.. -ifeq ($(TARGET), kindle-legacy) - KINDLE_LEGACY_LAUNCHER:=launchpad -endif - cd $(INSTALL_DIR) && \ + cd $(INSTALL_DIR) && pwd && \ zip -9 -r \ ../koreader-kindle-$(MACHINE)-$(VERSION).zip \ extensions koreader $(KINDLE_LEGACY_LAUNCHER) \ diff --git a/README.md b/README.md index df0667c1e..38a03102e 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ To get and compile the source you must have `patch`, `wget`, `unzip`, `git`, `au Ubuntu users may need to run: ``` -sudo apt-get install build-essential libtool +sudo apt-get install build-essential libtool gcc-multilib ``` Cross compile toolchains are available for Ubuntu users through these commands: diff --git a/base b/base index f9a4560ee..a4191d336 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit f9a4560eebe61519d5cfecb00626c166fb64c306 +Subproject commit a4191d33665e4a3c2a63b9d243913a12c9d7a890 diff --git a/frontend/ui/device.lua b/frontend/ui/device.lua index 7a35e0270..b9c538e15 100644 --- a/frontend/ui/device.lua +++ b/frontend/ui/device.lua @@ -55,7 +55,7 @@ function Device:getModel() elseif dx_set[kindle_devcode] then self.model = "Kindle2" elseif dxg_set[kindle_devcode] then - self.model = "Kindle2" + self.model = "KindleDXG" elseif k3_set[kindle_devcode] then self.model = "Kindle3" elseif k4_set[kindle_devcode] then @@ -120,7 +120,7 @@ function Device:hasKeyboard() if not isAndroid then local model = self:getModel() self.has_keyboard = (model == "Kindle2") or (model == "Kindle3") - or util.isEmulated() + or (model == "KindleDXG") or util.isEmulated() else self.has_keyboard = ffi.C.AConfiguration_getKeyboard(android.app.config) == ffi.C.ACONFIGURATION_KEYBOARD_QWERTY diff --git a/frontend/ui/input.lua b/frontend/ui/input.lua index 55762a1fb..dd2db85e7 100644 --- a/frontend/ui/input.lua +++ b/frontend/ui/input.lua @@ -456,6 +456,7 @@ function Input:init() input.open("/dev/input/event2") elseif dev_mod == "KindleDXG" then DEBUG("Auto-detected Kindle DXG") + input.open("/dev/input/event0") input.open("/dev/input/event1") elseif dev_mod == "Kindle2" then DEBUG("Auto-detected Kindle 2")