Skip to content

Commit 6efd145

Browse files
author
okay
committed
[harmony] update harmony for kobo
1 parent e6e1aed commit 6efd145

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/harmony/app/canvas.cpy

+8-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,15 @@ namespace app_ui:
160160
eraser->set_framebuffer(self.layers[cur_layer].fb.get())
161161

162162
bool ignore_event(input::SynMotionEvent &ev):
163+
#ifdef KOBO
164+
ev.pressure = 0.5
165+
ev.tilt_x = 0.5
166+
ev.tilt_y = 0.5
167+
return false
168+
#else
163169
return input::is_touch_event(ev) != NULL
170+
#endif
171+
164172

165173
void on_mouse_move(input::SynMotionEvent &ev):
166174
if not self.layers[cur_layer].visible:
@@ -410,8 +418,6 @@ namespace app_ui:
410418
return
411419

412420
dirty_rect := self.fb->dirty_area
413-
if dirty_rect.x0 > dirty_rect.x1 or dirty_rect.y0 > dirty_rect.y1:
414-
return
415421
debug "ADDING TO UNDO STACK, DIRTY AREA IS", \
416422
dirty_rect.x0, dirty_rect.y0, dirty_rect.x1, dirty_rect.y1
417423

src/harmony/main.cpy

+2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ class App:
8484
toolbar->pack_end(new app_ui::RedoButton(0, 0, ICON_WIDTH, TOOLBAR_HEIGHT, canvas))
8585
toolbar->pack_end(new app_ui::UndoButton(0, 0, ICON_WIDTH, TOOLBAR_HEIGHT, canvas))
8686
toolbar->pack_end(new app_ui::HistoryButton(0, 0, 100, TOOLBAR_HEIGHT, canvas))
87+
#ifndef KOBO
8788
toolbar->pack_end(new app_ui::PalmButton(0, 0, ICON_WIDTH, TOOLBAR_HEIGHT))
89+
#endif
8890

8991
canvas->mouse.up += PLS_LAMBDA(auto):
9092
toolbar->refresh()

src/rmkit/defines.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111

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

14-
#ifdef REMARKABLE
14+
#if defined(REMARKABLE)
1515
#define SAVE_DIR "/home/root/harmony/saved_images"
16+
#elif defined(KOBO)
17+
#define SAVE_DIR "/opt/data/harmony/"
1618
#else
1719
#define SAVE_DIR "./saved_images"
1820
#endif
21+
1922
#ifdef DEV
2023
// #define DEV_KBD "/dev/input/by-path/pci-0000:24:00.3-usb-0:3.2:1.0-event-kbd"
2124
// #define DEV_KBD "/dev/input/by-path/platform-i8042-serio-0-event-kbd"

0 commit comments

Comments
 (0)