mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 16:41:31 +00:00
Refactoring patch by DevHC
This commit is contained in:
parent
21668c0616
commit
fef4d12d68
31 changed files with 60 additions and 98 deletions
|
@ -34,8 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "../client/client.h"
|
||||
#include "../sys/sys_local.h"
|
||||
|
||||
#define ARRAYLEN(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
#ifdef MACOS_X
|
||||
// Mouse acceleration needs to be disabled
|
||||
#define MACOS_X_ACCELERATION_HACK
|
||||
|
@ -648,7 +646,7 @@ IN_JoyMove
|
|||
*/
|
||||
static void IN_JoyMove( void )
|
||||
{
|
||||
qboolean joy_pressed[ARRAYLEN(joy_keys)];
|
||||
qboolean joy_pressed[ARRAY_LEN(joy_keys)];
|
||||
unsigned int axes = 0;
|
||||
unsigned int hats = 0;
|
||||
int total = 0;
|
||||
|
@ -691,8 +689,8 @@ static void IN_JoyMove( void )
|
|||
total = SDL_JoystickNumButtons(stick);
|
||||
if (total > 0)
|
||||
{
|
||||
if (total > ARRAYLEN(stick_state.buttons))
|
||||
total = ARRAYLEN(stick_state.buttons);
|
||||
if (total > ARRAY_LEN(stick_state.buttons))
|
||||
total = ARRAY_LEN(stick_state.buttons);
|
||||
for (i = 0; i < total; i++)
|
||||
{
|
||||
qboolean pressed = (SDL_JoystickGetButton(stick, i) != 0);
|
||||
|
|
|
@ -99,8 +99,7 @@ static struct
|
|||
{ AUDIO_S16MSB, "AUDIO_S16MSB" }
|
||||
};
|
||||
|
||||
static int formatToStringTableSize =
|
||||
sizeof( formatToStringTable ) / sizeof( formatToStringTable[ 0 ] );
|
||||
static int formatToStringTableSize = ARRAY_LEN( formatToStringTable );
|
||||
|
||||
/*
|
||||
===============
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue