Merge branch 'Saturn-Next' into Saturn-Testing

This commit is contained in:
Alug committed 2025-02-17 21:34:18 +01:00
commit 457186fe40
6 files changed
+20 -14

No files matched your search

+3 -3
View File
@@ -215,10 +215,10 @@ static void D_GamePadMenuScrollTicker(void)
static void D_DeviceLEDTick(void)
{
UINT8 i;
UINT16 color[MAXSPLITSCREENPLAYERS];
UINT16 curcolor[MAXSPLITSCREENPLAYERS];
static UINT16 color[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0};
static UINT16 curcolor[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0};
if (dedicated || I_NumJoys() == 0)
if (dedicated || numcontrollers == 0)
{
return;
}
+2 -5
View File
@@ -895,20 +895,17 @@ UINT16 G_GetSkinColor(INT32 playernum)
{
case 0:
return cv_playercolor.value;
break;
case 1:
return cv_playercolor2.value;
break;
case 2:
return cv_playercolor3.value;
break;
case 3:
return cv_playercolor4.value;
break;
default:
return 0;
break;
}
return 0;
}
void G_SetPlayerGamepadIndicatorColor(INT32 playernum, UINT16 color)
+2
View File
@@ -230,6 +230,8 @@ void I_InitJoystick4(void);
*/
INT32 I_NumJoys(void);
extern INT32 numcontrollers;
/** \brief The *I_GetJoyName function
\param joyindex which joystick
+1 -1
View File
@@ -373,7 +373,7 @@ static void P_DeviceRumbleTick(void)
{
UINT8 i;
if (dedicated || I_NumJoys() == 0 || gamestate != GS_LEVEL)
if (dedicated || numcontrollers == 0 || gamestate != GS_LEVEL)
{
return;
}
+7 -5
View File
@@ -205,6 +205,8 @@ static char returnWadPath[256];
#include "../byteptr.h"
#endif
INT32 numcontrollers = 0;
#ifdef HAVE_LIBBACKTRACE
#include <backtrace.h>
// TODO - move this to some header file instead
@@ -1173,21 +1175,21 @@ void I_ShutdownJoystick(UINT8 index)
{
INT32 i;
event_t event;
event.type=ev_keyup;
event.type = ev_keyup;
event.data2 = 0;
event.data3 = 0;
lastjoybuttons[index] = lastjoyhats[index] = 0;
// emulate the up of all joystick buttons
for (i=0;i<JOYBUTTONS;i++)
for (i = 0; i < JOYBUTTONS; i++)
{
event.data1=KEY_JOY1+i;
event.data1=KEY_JOY1 + i;
D_PostEvent(&event);
}
// emulate the up of all joystick hats
for (i=0;i<JOYHATS*4;i++)
for (i = 0; i < JOYHATS*4; i++)
{
event.data1=KEY_HAT1+i;
D_PostEvent(&event);
@@ -1195,7 +1197,7 @@ void I_ShutdownJoystick(UINT8 index)
// reset joystick position
event.type = ev_joystick;
for (i=0;i<JOYAXISSET; i++)
for (i = 0; i < JOYAXISSET; i++)
{
event.data1 = i;
D_PostEvent(&event);
+5
View File
@@ -1256,6 +1256,8 @@ void I_GetEvent(void)
if (currentMenu == &OP_JoystickSetDef)
M_SetupJoystickMenu(0);
numcontrollers = I_NumJoys();
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
{
if (JoyInfo[i].dev == newcontroller)
@@ -1315,6 +1317,9 @@ void I_GetEvent(void)
// update the menu
if (currentMenu == &OP_JoystickSetDef)
M_SetupJoystickMenu(0);
numcontrollers = I_NumJoys();
break;
case SDL_DROPFILE:
dropped_filedir = evt.drop.file;