View Single Post
Old 02-03-2018, 05:58 PM   #42
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by geekraver View Post
Couldn't koReader leverage the driver code from Sergey that KSM uses? It's been years since I wrote Lua code but IIRC it was quite easy to wrap native code. Or does KSM have a Qt dependency too?
Wrapping C code would be very easy (well, dunno about that specific C code but in principle; much easier even through LuaJIT FFI than in plain Lua C bindings) but adding an extra layer of complexity and uncertainty is almost certainly not easier by any stretch of the imagination.

This is the standard stuff:

https://github.com/koreader/koreader....lua#L366-L426

And here is the Phoenix Protocol:

https://github.com/koreader/koreader....lua#L427-L491

You can imagine a C library that translates all odd Kobo deviations into standard events to simplify things ever so slightly, but there isn't that much going on in the first place.

I'm sure you can do it with some strategic debug statements and tweaks. You just need an SSH connection so you can quickly iterate tests.
Frenzie is offline   Reply With Quote