projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pure code janitoring: Shuffled the order of some of the case statements
[freeglut]
/
src
/
freeglut_joystick.c
diff --git
a/src/freeglut_joystick.c
b/src/freeglut_joystick.c
index
32ba917
..
4bb8a37
100644
(file)
--- a/
src/freeglut_joystick.c
+++ b/
src/freeglut_joystick.c
@@
-42,8
+42,6
@@
#include "config.h"
#endif
#include "config.h"
#endif
-#define G_LOG_DOMAIN "freeglut-joystick"
-
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
@@
-241,7
+239,7
@@
static void fghJoystickRawRead ( SFG_Joystick* joy, int* buttons, float* axes )
case JS_EVENT_BUTTON:
if ( joy->js.value == 0 ) /* clear the flag */
joy->tmp_buttons &= ~(1 << joy->js.number);
case JS_EVENT_BUTTON:
if ( joy->js.value == 0 ) /* clear the flag */
joy->tmp_buttons &= ~(1 << joy->js.number);
- else
+ else
joy->tmp_buttons |= (1 << joy->js.number);
break;
joy->tmp_buttons |= (1 << joy->js.number);
break;
@@
-599,17
+597,26
@@
void fgJoystickPollWindow( SFG_Window* window )
int buttons;
freeglut_return_if_fail( fgJoystick != NULL && window != NULL );
int buttons;
freeglut_return_if_fail( fgJoystick != NULL && window != NULL );
- freeglut_return_if_fail( window->Callbacks.Joystick != NULL );
+ freeglut_return_if_fail( FETCH_WCB( *window, Joystick ) );
fghJoystickRead( fgJoystick, &buttons, axes );
fghJoystickRead( fgJoystick, &buttons, axes );
- fgSetWindow (window);
- window->Callbacks.Joystick(
- buttons,
- (int) (axes[ 0 ] * 1000.0f),
- (int) (axes[ 1 ] * 1000.0f),
- (int) (axes[ 2 ] * 1000.0f)
+ INVOKE_WCB( *window, Joystick,
+ ( buttons,
+ (int) (axes[ 0 ] * 1000.0f ),
+ (int) (axes[ 1 ] * 1000.0f ),
+ (int) (axes[ 2 ] * 1000.0f ) )
);
);
+
+ /*
+ * fgSetWindow (window);
+ * window->Callbacks.Joystick(
+ * buttons,
+ * (int) (axes[ 0 ] * 1000.0f),
+ * (int) (axes[ 1 ] * 1000.0f),
+ * (int) (axes[ 2 ] * 1000.0f)
+ * );
+ */
}
/*
}
/*