remove redundant stuff

can just set this all the time, its only used when menu is active anyways so it doesent matter if we set it
This commit is contained in:
Alug committed 2025-01-03 19:45:46 +01:00
1 parent 5f0d47ca88
commit 729a74a561
2 files changed
+10 -21

No files matched your search

+2 -3
View File
@@ -166,7 +166,7 @@ UINT8 ctrldown = 0; // 0x1 left, 0x2 right
UINT8 altdown = 0; // 0x1 left, 0x2 right
boolean capslock = 0; // gee i wonder what this does.
static void D_PadScrollInput(int input)
static void D_PadMenuScrollInput(int input)
{
event_t myev = {0, 0, 0, 0};
myev.type = ev_keydown;
@@ -199,7 +199,7 @@ static void D_GamePadMenuScrollTicker(void)
menuInputDelayTimer++;
if (menuInputDelayTimer == SCROLLDELAY)
D_PadScrollInput(key);
D_PadMenuScrollInput(key);
}
else
{
@@ -816,7 +816,6 @@ void D_SRB2Loop(void)
doDisplay = true;
}
// this is absolutely awful and i hate it lmao
if (menuactive)
{
D_GamePadMenuScrollTicker();
+8 -18
View File
@@ -3689,40 +3689,28 @@ boolean M_Responder(event_t *ev)
break;
case KEY_HAT1:
ch = KEY_UPARROW;
DPADUPSCROLL = true;
break;
case KEY_HAT1 + 1:
ch = KEY_DOWNARROW;
DPADDOWNSCROLL = true;
break;
case KEY_HAT1 + 2:
ch = KEY_LEFTARROW;
DPADLEFTSCROLL = true;
break;
case KEY_HAT1 + 3:
ch = KEY_RIGHTARROW;
DPADRIGHTSCROLL = true;
break;
}
if (menuactive)
{
switch (ev->data1) // if you pressed it set those to true
{
case KEY_HAT1:
DPADUPSCROLL = true;
break;
case KEY_HAT1 + 1:
DPADDOWNSCROLL = true;
break;
case KEY_HAT1 + 2:
DPADLEFTSCROLL = true;
break;
case KEY_HAT1 + 3:
DPADRIGHTSCROLL = true;
break;
}
if (currentMenu == &MISC_ChangeLevelDef || currentMenu == &MP_OfflineServerDef || currentMenu == &MP_ServerDef)
{
if (ev->data1 == gamecontrol[gc_fire][0]
|| ev->data1 == gamecontrol[gc_fire][1])
if (ch == gamecontrol[gc_fire][0]
|| ch == gamecontrol[gc_fire][1])
{
COM_ImmedExecute("add kartencore 1");
}
@@ -4398,10 +4386,12 @@ void M_StartControlPanel(void)
menuactive = true;
// reset those just in case the game missed the keyup event
DPADUPSCROLL = false;
DPADDOWNSCROLL = false;
DPADLEFTSCROLL = false;
DPADRIGHTSCROLL = false;
//
if (demo.playback)
{