Skip to content

Commit

Permalink
[harmony] update harmony for kobo
Browse files Browse the repository at this point in the history
  • Loading branch information
okay committed Sep 25, 2023
1 parent e6e1aed commit f156869
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/harmony/app/canvas.cpy
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,15 @@ namespace app_ui:
eraser->set_framebuffer(self.layers[cur_layer].fb.get())

bool ignore_event(input::SynMotionEvent &ev):
#ifdef KOBO
ev.pressure = 0.5
ev.tilt_x = 0.5
ev.tilt_y = 0.5
return false
#else
return input::is_touch_event(ev) != NULL
#endif


void on_mouse_move(input::SynMotionEvent &ev):
if not self.layers[cur_layer].visible:
Expand Down
5 changes: 4 additions & 1 deletion src/rmkit/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@

#define ICON(name) icons::Icon { name, name ## _len, #name}

#ifdef REMARKABLE
#if defined(REMARKABLE)
#define SAVE_DIR "/home/root/harmony/saved_images"
#elif defined(KOBO)
#define SAVE_DIR "/opt/data/harmony/"
#else
#define SAVE_DIR "./saved_images"
#endif

#ifdef DEV
// #define DEV_KBD "/dev/input/by-path/pci-0000:24:00.3-usb-0:3.2:1.0-event-kbd"
// #define DEV_KBD "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
Expand Down

0 comments on commit f156869

Please sign in to comment.