Skip to main content

Key handling problem with DirectFB

3 replies [Last post]
tusharj9
Offline
Joined: 2005-09-22

Hi,
I have took recent phoneme_feature-mr2-rel-src-b23-08_may-2007.zip. And compiled it for DirectFB,
by setting USE_DIRECTFB = true.
Although graphics was shown on external emulator such as xoo, but key handling was not working.
When i checked code i found that has_pending_key_port() is not been implemented for handling DirectFb key events. After implementing this function for handling DirectFB and modifing key mappings in Fb_keymappings.c things worked.
Is it require to file bug for has_pending_key_port()'s implementation for DirectFB or is it already taken care ?

Regards,
Tushar

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
aap031
Offline
Joined: 2006-10-18

Hi Tushar,

The thing is that DirectFB is not in the list of supported platforms for phoneME Feature MR1 and MR2. That is why I believe the functionality was not working. However it might became supported for the next release so this is important to get this fixed. In case we will support it I believe there will be a bigger task assigned to do that (e.g. incluing performance measurements and optimizations).
However in any case if you could bring us your implementation we would greatly appreciate that

Regards,
Andrey

tusharj9
Offline
Joined: 2005-09-22

Hi Andrey,

At present I have modified has_pending_key_port() from Fb_handle_input.c as below.

jboolean has_pending_key_port() {

#ifdef DIRECTFB
//Check for availability of key event with DirectFb
return has_pending_key_dfb_port() ? KNI_TRUE : KNI_FALSE ;
#else
return bitscale_mode ?
keyState.hasPendingKeySignal :
KNI_FALSE;
#endif
}

And implemented function has_pending_key_dfb_port() in Directfbapp_export.c

/*Check if there is any pending key event available */
int has_pending_key_dfb_port() {
if (event_buffer->HasEvent(event_buffer) == DFB_OK) {
return 1;
}

return 0;
}

Also modified Fb_keymapping.c to add key code specific to xoo

KeyMapping i386_keys[] = {
{KEYMAP_KEY_0, 63003, 139},
....
}

Regards,
Tushar

aap031
Offline
Joined: 2006-10-18

Rather simple :) Thank you!

Yet we cannot use your code directly through you did not sign SCA. Indeed it's still helps to know it's not too much to implement

Regards,
Andrey