![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2008
Device: iliad
|
iLiad button support
I'm trying to port my Ren'Py visual novel engine over to the iLiad. So far, I have the port working reasonably well, with SDL displaying properly, and the screen refreshing as necessary.
However, I'm not able to get events from the hardware buttons on my iLiad. I'm able to get mouse events just fine from the stylus, but no keyboard input shows up. I've searched around a bit, but haven't been able to find documentation on how to get the hardware buttons supported. That probably means I haven't been searching on the right thing... if someone could please point me in the right direction, I'd appreciate it. Thanks. |
![]() |
![]() |
![]() |
#2 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
Don't know how to set that in SDL, tho (only know about changing the window title...). There apps for the iliad doing it properly for Gtk+, Gtk2-2.x and Qt, but AFAICT yours is the first using SDL, so it's in uncharted territory :-/.. Doing a quick check in google gives no meaningfull results, so you will probably have to set the window class in libsdl. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2008
Device: iliad
|
Okay, that did the trick, thanks!
There's several things I had to do to get SDL working on the iLiad: - I had to patch SDL to work with the StaticGray visual. Code:
--- src/video/x11/SDL_x11modes.c.old 2008-10-25 22:55:29.000000000 -0400 +++ src/video/x11/SDL_x11modes.c 2008-10-25 22:57:40.000000000 -0400 @@ -782,6 +782,7 @@ } else { add_visual(this, depth_list[i], PseudoColor); add_visual(this, depth_list[i], StaticColor); + add_visual(this, depth_list[i], StaticGray); } } } - It winds up that SDL doesn't really have support for StaticGray colors. So what I wound up doing was writing a routine that converts 24 bit color to 8 bit gray. Once I do that by hand, SDL takes care of drawing it to the string. - I have to take care of refreshing the screen myself. But that's simple... I just open a udp socket to localhost:50555, and write "!0,3,0" to it. But programming the iLiad in pygame is now possible, with some caveats. |
![]() |
![]() |
![]() |
#4 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
Quote:
iLiad provide 4 grayscale, why do you convert 24 bit color to 8 bit gray? I am working on a image viewer using gtk. To save memory, I wanted to load color image to grayscale, but gtk seems only support 24 bit rgb. I don't understand Antartica's words. He said something about setting class name "sh" to make app to receive button events from contentlister. Could somebody give an explaination? |
|
![]() |
![]() |
![]() |
#5 | ||
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
The underliying framebuffer also supports that, as it's implemented as a 8bpp framebuffer. As the screen is 4bpp (or 2bpp is using typing redraw in my experience), the least significant bits of each pixel are discarded inside the framebuffer driver, but that is off-limits for userspace applications. So in practice, all apps have to display 8bit grayscale images (independently of how they are stored internally, be it 24bpp RGB or 4bpp gray). I Quote:
In the iliad, that id is used to find the window that will receive hardware buttons synthetic keypresses (generated by contentlister). try: $ xwininfo -root $ xwininfo -root -children |
||
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
Quote:
I still have a question about how a app respond to key pressed event from contentliester. From ipdf source code, I copied "s_signal_connect" and "keyPressCbk" to my app, but that seems not enough. My app still not repond to PageUp and PageDown key. What part does I miss? I still don't know how and where to: make the main window of the application to have a class name of "sh" Should I use gtk_window_set_wmclass()? But I don't see it in ipdf source code. How does ipdf do it? Well, I guess the relevant code is (in GtkMgr.cpp) : Code:
gtk_window_set_title(GTK_WINDOW(window), PACKAGE " " VERSION ); Another question: I don't see PACKAGE " " VERSION defined in ipdf source code. Strange. Finally, I found the solution: http://forum.irexnet.com/viewtopic.php?t=1110 My guess is correct...partly. It seems both gtk_window_set_title and gtk_window_set_wmclass can do the right job. Last edited by ericshliao; 11-06-2008 at 05:32 PM. |
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Jun 2007
Device: Iliad
|
Whats the matter with sound in Renpy?
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2008
Device: iliad
|
It's currently disabled, as the slow CPU on the iLiad causes it to skip each time the page is refreshed. You can work around this by commenting out the RENPY_DISABLE_SOUND line in renpy-iliad.sh and rebuilding the package.
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Jun 2007
Device: Iliad
|
It is posible to avoid the double flicker when a image it´s showed?. I have this problem with the Iliad Comic viewer (in this forum).
It is posible to compile for Iilad with the last version?. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Please support my Report Bad Formatting Button petition for Kindle books! | Anarel | Amazon Kindle | 55 | 01-10-2010 06:24 PM |
iLiad Device Support | DesiLinguist | Calibre | 11 | 08-06-2009 01:58 AM |
iLiad Multiple Button support for iLiad stylus | jayk | iRex Developer's Corner | 18 | 11-25-2008 01:12 PM |
Thoughts on iLiad support | henrikb | iRex | 1 | 09-21-2008 07:56 PM |
Strange iliad problem: Button clicks don't work | henrikb | iRex | 1 | 07-26-2008 05:13 PM |