Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Make touch work on the H2O2 #3715

Merged
merged 3 commits into from Mar 4, 2018

Conversation

Projects
None yet
3 participants
@cairnsh
Copy link
Contributor

cairnsh commented Mar 4, 2018

This makes touch work on my H2O2, including multitouch zoom gestures, but not including rotate. Hopefully, it doesn't break any other devices.

@Frenzie
Copy link
Member

Frenzie left a comment

Looks good

@@ -376,16 +376,22 @@ end. Upon receiving an MT event, one simply updates the appropriate
attribute of the current slot.
--]]
function Input:handleTouchEv(ev)
function switch_slot_to(value)

This comment has been minimized.

@Frenzie

Frenzie Mar 4, 2018

Member

functions are camelCase

@@ -376,16 +376,22 @@ end. Upon receiving an MT event, one simply updates the appropriate
attribute of the current slot.
--]]
function Input:handleTouchEv(ev)
local switch_slot_to = function (value)

This comment has been minimized.

@Frenzie

Frenzie Mar 4, 2018

Member

functions camelCase please

How about this?

local setCurSlot = function(value)

This comment has been minimized.

@poire-z

poire-z Mar 4, 2018

Contributor

(I haven't looked much about the whole MTSlots code, just saying this after a quick look:)
why not make it a method of the Input object ? (so lua doesn't have to build a new function each time a touch event is processed)

@cairnsh

This comment has been minimized.

Copy link
Contributor Author

cairnsh commented Mar 4, 2018

Is that all right? The main work of that function is adding new slots to self.MTSlots, so I'm not sure if I want to call it setCurSlot. Maybe addSlotOnChange()?

@Frenzie Frenzie merged commit f74f19b into koreader:master Mar 4, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Mar 4, 2018

Hm, I agree with @poire-z but I already pressed merge. Would you mind making a second PR for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.