projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981024-1
[rocksndiamonds.git]
/
src
/
joystick.c
diff --git
a/src/joystick.c
b/src/joystick.c
index 0e1a42cd969b056933bd5589f6cc3e403fe4bc07..27a190fc6b14fb48464cc62c64c417000f36d304 100644
(file)
--- a/
src/joystick.c
+++ b/
src/joystick.c
@@
-16,16
+16,7
@@
#endif
#include "joystick.h"
#endif
#include "joystick.h"
-
-/*
-#include "tools.h"
-#include "game.h"
-#include "events.h"
-#include "sound.h"
#include "misc.h"
#include "misc.h"
-#include "buttons.h"
-#include <math.h>
-*/
void CheckJoystickData()
{
void CheckJoystickData()
{
@@
-83,6
+74,7
@@
int Joystick()
} joy_ctrl;
#endif
} joy_ctrl;
#endif
+ int joystick_nr = setup.input[0].joystick_nr;
int js_x,js_y, js_b1,js_b2;
int left, right, up, down;
int result=0;
int js_x,js_y, js_b1,js_b2;
int left, right, up, down;
int result=0;
@@
-93,8
+85,7
@@
int Joystick()
#ifndef MSDOS
if (read(joystick_device, &joy_ctrl, sizeof(joy_ctrl)) != sizeof(joy_ctrl))
{
#ifndef MSDOS
if (read(joystick_device, &joy_ctrl, sizeof(joy_ctrl)) != sizeof(joy_ctrl))
{
- fprintf(stderr,"%s: cannot read joystick settings - no joystick support\n",
- progname);
+ Error(ERR_RETURN, "cannot read joystick settings - no joystick support");
joystick_status = JOYSTICK_OFF;
return(0);
}
joystick_status = JOYSTICK_OFF;
return(0);
}