[Ohrrpgce] SVN: james/5836 Add show_virtual_keyboard() and hide_virtual_keyboard() and use them in

James Paige Bob at HamsterRepublic.com
Sat Jun 15 12:11:44 PDT 2013


On Sun, Jun 16, 2013 at 04:42:42AM +1200, Ralph Versteegen wrote:
> I haven't tried this yet, but why turn on the
> "CompatibilityHacksTextInputEmulatesHwKeyboard" option? The
> description seems to state it is only targetted for a single app.

Without it, showing the keyboard caused the keyboard to display, and 
then vanish again in a fraction of a second, and send an ENTER key Then 
it would pop up again, and vanish again with another ENTER, and it would 
repeat until close the program.

When I turned on CompatibilityHacksTextInputEmulatesHwKeyboard then the 
keyboard (at first glance) appeared to start working correctly.

> Also
> I noticed in MainActivity.java that turning on this option disables
> the hideScreenKeyboard method, because the _screenKeyboard member is
> never set.

Ah, that explains why it would not hide automatically.

Also, after more testing this morning, I can see that the first call to 
show_virtual_keyboard shows it okay, but if I leave it in screen and 
rename a hero again, then it toggles off.

So I am definitely not doing things right yet. I'll try again to get it 
working without the compatability hacks.

> Also, why call SDL_ANDROID_CallJavaShowScreenKeyboard and
> SDL_ANDROID_CallJavaHideScreenKeyboard directly instead of the public
> functions in SDL_screenkeyboard.h?

Oh, I had no idea that those existed. I found the 
SDL_ANDROID_CallJavaShowScreenKeyboard just by grepping the files in 
sdl-android/projects/jni/sdl-1.2 and I failed to notice the better 
functions. I'll try them next.

> BTW, even after implementing io_show/hide_virtual_keyboard in
> gfx_directx, you should still check whether those function pointers
> are NULL before calling them, otherwise using an old version of
> gfx_directx.dll will cause a segfault

How do I check a sub pointer for nullity? I can see how to check 
functions that require >0 arguments, but how do I do

  IF subpointer = NULL THEN

Without executing the sub or argumentless function?

---
James

> On 15 June 2013 09:58,  <subversion at hamsterrepublic.com> wrote:
> > james
> > 2013-06-14 14:58:21 -0700 (Fri, 14 Jun 2013)
> > 276
> > Add show_virtual_keyboard() and hide_virtual_keyboard() and use them in renamehero()
> >
> > * Does nothing on platforms/backends that don't support it
> > * Does nothing on non-Android
> > * hide_virtual_keyboard does not work yet, I have not figured out why, but you can manually close it
> > ---
> > U   wip/allmodex.bas
> > U   wip/allmodex.bi
> > U   wip/android/AndroidAppSettings.cfg
> > U   wip/backends.bas
> > U   wip/gfx.bi
> > U   wip/gfx_alleg.bas
> > U   wip/gfx_console.bas
> > U   wip/gfx_fb.bas
> > U   wip/gfx_sdl.bas
> > U   wip/moresubs.bas
> > _______________________________________________
> > Ohrrpgce mailing list
> > ohrrpgce at lists.motherhamster.org
> > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> 



More information about the Ohrrpgce mailing list