From: black Date: Thu, 6 Dec 2007 17:12:10 +0000 (+0000) Subject: Fix a bug - tbh I dont understand why the other menu control worked at all yesterday :o X-Git-Tag: xonotic-v0.1.0preview~2717 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=52de46587c44c52da685cd24de040d70728ce815;p=xonotic%2Fdarkplaces.git Fix a bug - tbh I dont understand why the other menu control worked at all yesterday :o git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7772 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_gecko.c b/cl_gecko.c index 7442e768..3d200dc0 100644 --- a/cl_gecko.c +++ b/cl_gecko.c @@ -351,7 +351,6 @@ qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventty OSGK_KeyboardEventType mappedtype; unsigned int mappedkey = key; - int i; // yes! then convert it if necessary! for( i = 0 ; i < sizeof( geckokeymappingtable ) / sizeof( *geckokeymappingtable ) ; i++ ) { @@ -396,11 +395,13 @@ qboolean CL_Gecko_Event_Key( clgecko_t *instance, int key, clgecko_buttoneventty mappedtype = meDoubleClick; break; case CLG_BET_PRESS: - // TODO: error message + // hihi, hacky hacky + osgk_browser_event_key( instance->browser, mappedkey, meDown ); + mappedtype = meUp; break; } - return true; + return osgk_browser_event_key( instance->browser, mappedkey, mappedtype ) != 0; } // TODO: error? return false; diff --git a/prvm_cmds.c b/prvm_cmds.c index 04f0860d..1b2f87ae 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -3231,7 +3231,7 @@ void VM_gecko_keyevent( void ) { name = PRVM_G_STRING( OFS_PARM0 ); VM_CheckEmptyString( name ); key = (unsigned int) PRVM_G_FLOAT( OFS_PARM1 ); - switch( (unsigned int) PRVM_G_FLOAT( OFS_PARM3 ) ) { + switch( (unsigned int) PRVM_G_FLOAT( OFS_PARM2 ) ) { case 0: eventtype = CLG_BET_DOWN; break;