mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-07 07:21:10 +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);
|
void CONTROL_ProcessBinds(void);
|
||||||
|
|
||||||
|
#define CONTROL_GetUserInput(...)
|
||||||
|
#define CONTROL_ClearUserInput(...)
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|
||||||
#define CONTROL_NUM_FLAGS 64
|
#define CONTROL_NUM_FLAGS 64
|
||||||
|
|
|
@ -241,7 +241,7 @@ void CONFIG_SetDefaults(void)
|
||||||
|
|
||||||
MouseAnalogAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]);
|
MouseAnalogAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]);
|
||||||
}
|
}
|
||||||
CONTROL_SetMouseSensitivity(gs.MouseSpeed);
|
CONTROL_MouseSensitivity = float(gs.MouseSpeed); // [JM] Temporary !CHECKME!
|
||||||
|
|
||||||
memset(JoystickButtons, -1, sizeof(JoystickButtons));
|
memset(JoystickButtons, -1, sizeof(JoystickButtons));
|
||||||
memset(JoystickButtonsClicked, -1, sizeof(JoystickButtonsClicked));
|
memset(JoystickButtonsClicked, -1, sizeof(JoystickButtonsClicked));
|
||||||
|
@ -290,8 +290,10 @@ void SetDefaultKeyDefinitions(int style)
|
||||||
if (f == -1) continue;
|
if (f == -1) continue;
|
||||||
k1 = KB_StringToScanCode(keydefaultset[3*i+1]);
|
k1 = KB_StringToScanCode(keydefaultset[3*i+1]);
|
||||||
k2 = KB_StringToScanCode(keydefaultset[3*i+2]);
|
k2 = KB_StringToScanCode(keydefaultset[3*i+2]);
|
||||||
|
// [JM] Needs to be rewritten, I think. !CHECKME!
|
||||||
|
#if 0
|
||||||
CONTROL_MapKey(i, k1, k2);
|
CONTROL_MapKey(i, k1, k2);
|
||||||
|
#endif
|
||||||
|
|
||||||
KeyboardKeys[f][0] = k1;
|
KeyboardKeys[f][0] = k1;
|
||||||
KeyboardKeys[f][1] = k2;
|
KeyboardKeys[f][1] = k2;
|
||||||
|
@ -386,8 +388,11 @@ void CONFIG_ReadKeys(int32_t scripthandle)
|
||||||
{
|
{
|
||||||
if (i == gamefunc_Show_Console)
|
if (i == gamefunc_Show_Console)
|
||||||
OSD_CaptureKey(KeyboardKeys[i][0]);
|
OSD_CaptureKey(KeyboardKeys[i][0]);
|
||||||
|
#if 0
|
||||||
|
// [JM] Needs to be re-done. !CHECKME!
|
||||||
else
|
else
|
||||||
CONTROL_MapKey(i, KeyboardKeys[i][0], KeyboardKeys[i][1]);
|
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_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][0], 0, controldevice_joystick);
|
||||||
CONTROL_MapDigitalAxis(i, JoystickDigitalAxes[i][1], 1, controldevice_joystick);
|
CONTROL_MapDigitalAxis(i, JoystickDigitalAxes[i][1], 1, controldevice_joystick);
|
||||||
CONTROL_SetAnalogAxisScale(i, JoystickAnalogScale[i], controldevice_joystick);
|
CONTROL_SetAnalogAxisScale(i, JoystickAnalogScale[i], controldevice_joystick);
|
||||||
CONTROL_SetJoyAxisDead(i, JoystickAnalogDead[i]);
|
//CONTROL_SetJoyAxisDead(i, JoystickAnalogDead[i]);
|
||||||
CONTROL_SetJoyAxisSaturate(i, JoystickAnalogSaturate[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();
|
KeyboardKeys[currentkey][currentcol] = KB_GetLastScanCode();
|
||||||
if (currentkey != gamefunc_Show_Console)
|
if (currentkey != gamefunc_Show_Console)
|
||||||
{
|
{
|
||||||
|
#if 0 // [JM] Re-do this shit !CHECKME!
|
||||||
CONTROL_MapKey(currentkey,
|
CONTROL_MapKey(currentkey,
|
||||||
KeyboardKeys[currentkey][0],
|
KeyboardKeys[currentkey][0],
|
||||||
KeyboardKeys[currentkey][1]);
|
KeyboardKeys[currentkey][1]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -855,9 +857,11 @@ SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item)
|
||||||
if (currentkey != gamefunc_Show_Console)
|
if (currentkey != gamefunc_Show_Console)
|
||||||
{
|
{
|
||||||
KeyboardKeys[currentkey][currentcol] = 0xff;
|
KeyboardKeys[currentkey][currentcol] = 0xff;
|
||||||
|
#if 0 // [JM] Re-do this shit !CHECKME!
|
||||||
CONTROL_MapKey(currentkey,
|
CONTROL_MapKey(currentkey,
|
||||||
KeyboardKeys[currentkey][0],
|
KeyboardKeys[currentkey][0],
|
||||||
KeyboardKeys[currentkey][1]);
|
KeyboardKeys[currentkey][1]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (KB_KeyPressed(sc_Home))
|
else if (KB_KeyPressed(sc_Home))
|
||||||
|
@ -3642,7 +3646,7 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
|
||||||
slidersettings[sldr_mouse] = offset;
|
slidersettings[sldr_mouse] = offset;
|
||||||
|
|
||||||
gs.MouseSpeed = offset * (MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX);
|
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;
|
break;
|
||||||
|
|
||||||
case sldr_sndfxvolume:
|
case sldr_sndfxvolume:
|
||||||
|
@ -3992,13 +3996,15 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
|
||||||
if (item->slider == sldr_joyaxisdead)
|
if (item->slider == sldr_joyaxisdead)
|
||||||
{
|
{
|
||||||
JoystickAnalogDead[JoystickAxisPage] = min((offset<<10), 32767);
|
JoystickAnalogDead[JoystickAxisPage] = min((offset<<10), 32767);
|
||||||
CONTROL_SetJoyAxisDead(JoystickAxisPage, JoystickAnalogDead[JoystickAxisPage]);
|
//CONTROL_SetJoyAxisDead(JoystickAxisPage, JoystickAnalogDead[JoystickAxisPage]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
JoystickAnalogSaturate[JoystickAxisPage] = min((offset<<10), 32767);
|
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);
|
sprintf(tmp_text, "%.2f%%", (float)(slidersettings[item->slider]<<10) / 32767.f);
|
||||||
|
|
Loading…
Reference in a new issue