projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3d1fd98
)
fixed compiler warning by adding missing variable initialization (finally)
author
Holger Schemel
<info@artsoft.org>
Wed, 27 Sep 2017 20:11:58 +0000
(22:11 +0200)
committer
Holger Schemel
<info@artsoft.org>
Wed, 27 Sep 2017 20:11:58 +0000
(22:11 +0200)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 0a63c2e40cb9575d5c65eecd94b3d75092cc2d06..a5bc5ac1b7009f31f46d5831681f9705d7eb8d2e 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-6522,7
+6522,6
@@
static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
static boolean bitmaps_initialized = FALSE;
boolean screen_initialized = FALSE;
static Bitmap *controller, *button, *axis_x, *axis_y;
static boolean bitmaps_initialized = FALSE;
boolean screen_initialized = FALSE;
static Bitmap *controller, *button, *axis_x, *axis_y;
- Bitmap *marker;
char *name;
boolean success = TRUE;
boolean done = FALSE, next = FALSE;
char *name;
boolean success = TRUE;
boolean done = FALSE, next = FALSE;
@@
-6581,8
+6580,6
@@
static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
axis_x = LoadCustomImage("joystick/axis_x.png");
axis_y = LoadCustomImage("joystick/axis_y.png");
axis_x = LoadCustomImage("joystick/axis_x.png");
axis_y = LoadCustomImage("joystick/axis_y.png");
- marker = button; /* initialize with reliable default value */
-
bitmaps_initialized = TRUE;
}
bitmaps_initialized = TRUE;
}
@@
-6604,6
+6601,8
@@
static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
/* loop through all steps (buttons and axes), getting joystick events */
for (i = 0; i < SDL_arraysize(steps) && !done;)
{
/* loop through all steps (buttons and axes), getting joystick events */
for (i = 0; i < SDL_arraysize(steps) && !done;)
{
+ Bitmap *marker = button; /* initialize with reliable default value */
+
step = &steps[i];
strcpy(step->mapping, mapping);
step->axis = -1;
step = &steps[i];
strcpy(step->mapping, mapping);
step->axis = -1;