Merge branch 'Saturn-Next' into serverstuttertest
This commit is contained in:
commit
51ba4f1ec8
6 files changed
+22
-16
No files matched your search
+3
-3
@@ -214,10 +214,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
@@ -928,20 +928,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)
|
||||
|
||||
@@ -226,6 +226,8 @@ void I_InitJoystick4(void);
|
||||
*/
|
||||
INT32 I_NumJoys(void);
|
||||
|
||||
extern INT32 numcontrollers;
|
||||
|
||||
/** \brief The *I_GetJoyName function
|
||||
|
||||
\param joyindex which joystick
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+9
-7
@@ -201,6 +201,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
|
||||
@@ -1170,21 +1172,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);
|
||||
@@ -1192,7 +1194,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);
|
||||
@@ -1486,7 +1488,7 @@ const char *I_GetJoyName(INT32 joyindex)
|
||||
void I_GamepadRumble(INT32 playernum, UINT16 low_strength, UINT16 high_strength, UINT32 duration)
|
||||
{
|
||||
#if !(SDL_VERSION_ATLEAST(2,0,14))
|
||||
(void)device_id;
|
||||
(void)playernum;
|
||||
(void)low_strength;
|
||||
(void)high_strength;
|
||||
(void)duration;
|
||||
@@ -1504,7 +1506,7 @@ void I_GamepadRumble(INT32 playernum, UINT16 low_strength, UINT16 high_strength,
|
||||
void I_SetGamepadIndicatorColor(INT32 playernum, UINT8 red, UINT8 green, UINT8 blue)
|
||||
{
|
||||
#if !(SDL_VERSION_ATLEAST(2,0,14))
|
||||
(void)device_id;
|
||||
(void)playernum;
|
||||
(void)red;
|
||||
(void)green;
|
||||
(void)blue;
|
||||
|
||||
@@ -1252,6 +1252,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)
|
||||
@@ -1311,6 +1313,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;
|
||||
|
||||
Reference in new issue
Block a user