Skip to content

Commit 8e138bc

Browse files
committed
Fixed a typo in the magellan compatibility wrapper which obviously broke compatibility :)
Thanks to Jon Scholz for pointing it out. (also some whitespace fixes) git-svn-id: svn+ssh://svn.code.sf.net/p/spacenav/code/trunk/libspnav@101 ef983eb1-d774-4af8-acfd-baaf7b16a646
1 parent 9219db9 commit 8e138bc

7 files changed

Lines changed: 14 additions & 13 deletions

File tree

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lib_so = $(soname).1
77

88
CC = gcc
99
AR = ar
10-
CFLAGS = $(opt) $(dbg) -std=c89 -fpic -pedantic -Wall -fno-strict-aliasing -g -I.
10+
CFLAGS = $(opt) $(dbg) -std=c89 -fpic -pedantic -Wall -fno-strict-aliasing -I.
1111

1212
.PHONY: all
1313
all: $(lib_a) $(lib_so)

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
libspnav - 0.2.1
1+
libspnav - 0.2.2
22
----------------
33

44
1. About

examples/cube/cube.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ GLXContext ctx;
3333
Window win;
3434

3535
vec3_t pos = {0, 0, -6};
36-
quat_t rot = {0, 0, 0, 1};
36+
quat_t rot = {0, 0, 0, 1}; /* that's 1 + 0i + 0j + 0k */
3737

3838
int redisplay;
3939

@@ -130,7 +130,7 @@ int create_gfx(int xsz, int ysz)
130130
XSetWMProtocols(dpy, win, &wm_del_win, 1);
131131

132132
set_window_title("libspnav cube");
133-
133+
134134
class_hint.res_name = "cube";
135135
class_hint.res_class = "cube";
136136
XSetClassHint(dpy, win, &class_hint);
@@ -168,7 +168,7 @@ void set_window_title(const char *title)
168168
void redraw(void)
169169
{
170170
mat4_t xform;
171-
171+
172172
quat_to_mat(xform, rot);
173173

174174
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -292,6 +292,7 @@ int handle_event(XEvent *xev)
292292
if((sym & 0xff) == 27) {
293293
return 1;
294294
}
295+
break;
295296

296297
case ConfigureNotify:
297298
{

spnav.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of libspnav, part of the spacenav project (spacenav.sf.net)
3-
Copyright (C) 2007-2009 John Tsiombikas <nuclear@siggraph.org>
3+
Copyright (C) 2007-2010 John Tsiombikas <nuclear@member.fsf.org>
44
55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:
@@ -205,7 +205,7 @@ static int x11_sensitivity(double sens)
205205
Window daemon_win;
206206
float fsens;
207207
unsigned int isens;
208-
208+
209209
if(!(daemon_win = get_daemon_window(dpy))) {
210210
return -1;
211211
}
@@ -428,7 +428,7 @@ static int enqueue_event(spnav_event *event, struct event_node **tailptr)
428428
if(!tailptr) {
429429
tailptr = &ev_queue_tail;
430430
}
431-
431+
432432
(*tailptr)->next = node;
433433
*tailptr = node;
434434
return 0;

spnav.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of libspnav, part of the spacenav project (spacenav.sf.net)
3-
Copyright (C) 2007-2009 John Tsiombikas <nuclear@siggraph.org>
3+
Copyright (C) 2007-2010 John Tsiombikas <nuclear@member.fsf.org>
44
55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:

spnav_magellan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of libspnav, part of the spacenav project (spacenav.sf.net)
3-
Copyright (C) 2007-2009 John Tsiombikas <nuclear@siggraph.org>
3+
Copyright (C) 2007-2010 John Tsiombikas <nuclear@member.fsf.org>
44
55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:
@@ -71,7 +71,7 @@ int MagellanInputEvent(Display *dpy, XEvent *xev, MagellanIntEvent *mev)
7171
}
7272
mev->u.data[6] = event.motion.period * 1000 / 60;
7373
} else {
74-
mev->type = event.button.press ? MagellanInputButtonEvent : MagellanInputButtonReleaseEvent;
74+
mev->type = event.button.press ? MagellanInputButtonPressEvent : MagellanInputButtonReleaseEvent;
7575
mev->u.button = event.button.bnum;
7676
}
7777

@@ -96,7 +96,7 @@ int MagellanTranslateEvent(Display *dpy, XEvent *xev, MagellanFloatEvent *mev, d
9696
}
9797
mev->MagellanPeriod = event.motion.period;
9898
} else {
99-
mev->MagellanType = event.button.press ? MagellanInputButtonEvent : MagellanInputButtonReleaseEvent;
99+
mev->MagellanType = event.button.press ? MagellanInputButtonPressEvent : MagellanInputButtonReleaseEvent;
100100
mev->MagellanButton = event.button.bnum;
101101
}
102102

spnav_magellan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of libspnav, part of the spacenav project (spacenav.sf.net)
3-
Copyright (C) 2007-2009 John Tsiombikas <nuclear@siggraph.org>
3+
Copyright (C) 2007-2010 John Tsiombikas <nuclear@member.fsf.org>
44
55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)