This patch adjusts S110's kbd so it doesn't interfere with shooting (ptp) when keeping the KEY_POWER phisically pressed.
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
diff --git a/platform/s110/kbd.c b/platform/s110/kbd.c
index 512c136..1f968a3 100644
--- a/platform/s110/kbd.c
+++ b/platform/s110/kbd.c
@@ -17,7 +17,7 @@ static long kbd_mod_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
extern void _GetKbdState(long*);
#define KEYS_MASK0 (0x000181EF)
-#define KEYS_MASK1 (0x00C00000)
+#define KEYS_MASK1 (0x00800000)
#define KEYS_MASK2 (0x000000C0)
#define SD_READONLY_FLAG 0x00000800 // Found @0xf864bc7c, levent 0x20a
@@ -46,9 +46,11 @@ static KeyMap keymap[] = {
{ 0, KEY_VIDEO ,0x00000100 },
{ 0, KEY_ZOOM_OUT ,0x00008000 }, // Found @0xf864bc2c, levent 0x03
{ 0, KEY_ZOOM_IN ,0x00010000 }, // Found @0xf864bc34, levent 0x02
- { 1, KEY_POWER ,0x00400000 }, // Found @0xf864bc54, levent 0x100
+
+// Removed since it breaks when shooting with KEY_POWER pressed
+// { 1, KEY_POWER ,0x00400000 }, // Found @0xf864bc54, levent 0x100
{ 1, KEY_PLAYBACK ,0x00800000 }, // Found @0xf864bc5c, levent 0x101
- { 1, KEY_PRINT ,0x00800000 }, // = Default ALT button
+
{ 2, KEY_SHOOT_FULL ,0x000000c0 }, // Found @0xf864bc6c, levent 0x01
{ 2, KEY_SHOOT_FULL_ONLY ,0x00000080 }, // Found @0xf864bc6c, levent 0x01
{ 2, KEY_SHOOT_HALF ,0x00000040 }, // Found @0xf864bc64, levent 0x00
diff --git a/platform/s110/platform_camera.h b/platform/s110/platform_camera.h
index fc80d34..3241060 100644
--- a/platform/s110/platform_camera.h
+++ b/platform/s110/platform_camera.h
@@ -37,8 +37,8 @@
#define CAM_HAS_NATIVE_ND_FILTER 1 // Camera has built-in ND filter with Canon menu support for enable/disable
#define CAM_ADJUSTABLE_ALT_BUTTON 1
- #define CAM_ALT_BUTTON_NAMES { "Playback", "Video", "Display" }
- #define CAM_ALT_BUTTON_OPTIONS { KEY_PRINT, KEY_VIDEO, KEY_DISPLAY }
+ #define CAM_ALT_BUTTON_NAMES { "Display", "Video" }
+ #define CAM_ALT_BUTTON_OPTIONS { KEY_DISPLAY, KEY_VIDEO }
#undef CAM_CAN_SD_OVER_NOT_IN_MF
#undef CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO