hex007 / freej2me

A free J2ME emulator with libretro, awt and sdl2 frontends.
Other
487 stars 75 forks source link

Implement Nokia Middle button keycode #68

Closed Nokia64 closed 4 years ago

Nokia64 commented 4 years ago

This implements the Nokia Middle button softkey:

KEY_SOFTKEY3

public static final int KEY_SOFTKEY3
Key code constant for select key, middle softkey or second command button key. Not all devices have this key. The value is -5. 

for games that depend on it. And modifies some other parts of FreeJ2ME to fully integrate the softkey.

WARNING / NOTE: I modified javax.microedition.lcdui.Canvas replacing KEY_NUM5 with NOKIA_SOFT3. I'm not pretty sure of the correctness of this modification at all. I'm not sure what the behavior should be when phone is set to Nokia or Standard, since they appear to be harcoded to Nokia. :confused: . Shouldn't they be config-dependent?

recompileorg commented 4 years ago

Like I've said before, that whole thing needs redone. I'll look over your changes, but there may be something that needs done with displayable as well. Anyhow, I'll get to it shortly

Nokia64 commented 4 years ago

Great. Won't mess up more this code if it's meant to be rewritten.

recompileorg commented 4 years ago

We still could have applied your PR, I was just noting that there are likely a lot of problems with those in reply to your question "Shouldn't they be config-dependent?"

It looked okay at a glance, I just didn't have time to test it out.