mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
SW: Hacks to input code just to get it to compile.
Patch from Striker. git-svn-id: https://svn.eduke32.com/eduke32@7521 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c36897e466
commit
6689bbd913
3 changed files with 23 additions and 8 deletions
|
@ -200,6 +200,9 @@ static inline int CONTROL_KeyIsBound(int const key)
|
|||
|
||||
void CONTROL_ProcessBinds(void);
|
||||
|
||||
#define CONTROL_GetUserInput(...)
|
||||
#define CONTROL_ClearUserInput(...)
|
||||
|
||||
////////////////////
|
||||
|
||||
#define CONTROL_NUM_FLAGS 64
|
||||
|
|
|
@ -241,7 +241,7 @@ void CONFIG_SetDefaults(void)
|
|||
|
||||
MouseAnalogAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]);
|
||||
}
|
||||
CONTROL_SetMouseSensitivity(gs.MouseSpeed);
|
||||
CONTROL_MouseSensitivity = float(gs.MouseSpeed); // [JM] Temporary !CHECKME!
|
||||
|
||||
memset(JoystickButtons, -1, sizeof(JoystickButtons));
|
||||
memset(JoystickButtonsClicked, -1, sizeof(JoystickButtonsClicked));
|
||||
|
@ -290,8 +290,10 @@ void SetDefaultKeyDefinitions(int style)
|
|||
if (f == -1) continue;
|
||||
k1 = KB_StringToScanCode(keydefaultset[3*i+1]);
|
||||
k2 = KB_StringToScanCode(keydefaultset[3*i+2]);
|
||||
|
||||
// [JM] Needs to be rewritten, I think. !CHECKME!
|
||||
#if 0
|
||||
CONTROL_MapKey(i, k1, k2);
|
||||
#endif
|
||||
|
||||
KeyboardKeys[f][0] = k1;
|
||||
KeyboardKeys[f][1] = k2;
|
||||
|
@ -386,8 +388,11 @@ void CONFIG_ReadKeys(int32_t scripthandle)
|
|||
{
|
||||
if (i == gamefunc_Show_Console)
|
||||
OSD_CaptureKey(KeyboardKeys[i][0]);
|
||||
#if 0
|
||||
// [JM] Needs to be re-done. !CHECKME!
|
||||
else
|
||||
CONTROL_MapKey(i, KeyboardKeys[i][0], KeyboardKeys[i][1]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,7 +462,7 @@ void CONFIG_SetupMouse(void)
|
|||
CONTROL_SetAnalogAxisScale(i, MouseAnalogScale[i], controldevice_mouse);
|
||||
}
|
||||
|
||||
CONTROL_SetMouseSensitivity(gs.MouseSpeed);
|
||||
CONTROL_MouseSensitivity = float(gs.MouseSpeed); // [JM] Temporary !CHECKME!
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -530,8 +535,9 @@ void CONFIG_SetupJoystick(void)
|
|||
CONTROL_MapDigitalAxis(i, JoystickDigitalAxes[i][0], 0, controldevice_joystick);
|
||||
CONTROL_MapDigitalAxis(i, JoystickDigitalAxes[i][1], 1, controldevice_joystick);
|
||||
CONTROL_SetAnalogAxisScale(i, JoystickAnalogScale[i], controldevice_joystick);
|
||||
CONTROL_SetJoyAxisDead(i, JoystickAnalogDead[i]);
|
||||
CONTROL_SetJoyAxisSaturate(i, JoystickAnalogSaturate[i]);
|
||||
//CONTROL_SetJoyAxisDead(i, JoystickAnalogDead[i]);
|
||||
//CONTROL_SetJoyAxisSaturate(i, JoystickAnalogSaturate[i]);
|
||||
joySetDeadZone(i, JoystickAnalogDead[i], JoystickAnalogSaturate[i]); // [JM] !CHECKME!
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -803,9 +803,11 @@ SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item)
|
|||
KeyboardKeys[currentkey][currentcol] = KB_GetLastScanCode();
|
||||
if (currentkey != gamefunc_Show_Console)
|
||||
{
|
||||
#if 0 // [JM] Re-do this shit !CHECKME!
|
||||
CONTROL_MapKey(currentkey,
|
||||
KeyboardKeys[currentkey][0],
|
||||
KeyboardKeys[currentkey][1]);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -855,9 +857,11 @@ SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item)
|
|||
if (currentkey != gamefunc_Show_Console)
|
||||
{
|
||||
KeyboardKeys[currentkey][currentcol] = 0xff;
|
||||
#if 0 // [JM] Re-do this shit !CHECKME!
|
||||
CONTROL_MapKey(currentkey,
|
||||
KeyboardKeys[currentkey][0],
|
||||
KeyboardKeys[currentkey][1]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (KB_KeyPressed(sc_Home))
|
||||
|
@ -3642,7 +3646,7 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
|
|||
slidersettings[sldr_mouse] = offset;
|
||||
|
||||
gs.MouseSpeed = offset * (MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX);
|
||||
CONTROL_SetMouseSensitivity(gs.MouseSpeed);
|
||||
CONTROL_MouseSensitivity = float(gs.MouseSpeed); // [JM] Will need to verify this. !CHECKME!
|
||||
break;
|
||||
|
||||
case sldr_sndfxvolume:
|
||||
|
@ -3992,13 +3996,15 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
|
|||
if (item->slider == sldr_joyaxisdead)
|
||||
{
|
||||
JoystickAnalogDead[JoystickAxisPage] = min((offset<<10), 32767);
|
||||
CONTROL_SetJoyAxisDead(JoystickAxisPage, JoystickAnalogDead[JoystickAxisPage]);
|
||||
//CONTROL_SetJoyAxisDead(JoystickAxisPage, JoystickAnalogDead[JoystickAxisPage]);
|
||||
}
|
||||
else
|
||||
{
|
||||
JoystickAnalogSaturate[JoystickAxisPage] = min((offset<<10), 32767);
|
||||
CONTROL_SetJoyAxisSaturate(JoystickAxisPage, JoystickAnalogSaturate[JoystickAxisPage]);
|
||||
//CONTROL_SetJoyAxisSaturate(JoystickAxisPage, JoystickAnalogSaturate[JoystickAxisPage]);
|
||||
}
|
||||
|
||||
joySetDeadZone(JoystickAxisPage, JoystickAnalogDead[JoystickAxisPage], JoystickAnalogSaturate[JoystickAxisPage]); // [JM] !CHECKME!
|
||||
}
|
||||
|
||||
sprintf(tmp_text, "%.2f%%", (float)(slidersettings[item->slider]<<10) / 32767.f);
|
||||
|
|
Loading…
Reference in a new issue