projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oh well, I might as well add the call to clear callbacks on window
[freeglut]
/
src
/
freeglut_joystick.c
diff --git
a/src/freeglut_joystick.c
b/src/freeglut_joystick.c
index
1b2285b
..
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"
@@
-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)
+ * );
+ */
}
/*
}
/*