summaryrefslogtreecommitdiff
path: root/navit/graphics/sdl/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/graphics/sdl/event.c')
-rw-r--r--navit/graphics/sdl/event.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/navit/graphics/sdl/event.c b/navit/graphics/sdl/event.c
index f96b079b3..647330813 100644
--- a/navit/graphics/sdl/event.c
+++ b/navit/graphics/sdl/event.c
@@ -48,7 +48,7 @@ static void sdl_accelerometer_handler(void* param) {
int zAxis = SDL_JoystickGetAxis(accelerometer, 2);
unsigned char new_orientation;
- dbg(lvl_info, "x(%d) y(%d) z(%d) c(%d)\n", xAxis, yAxis, zAxis,
+ dbg(lvl_info, "x(%d) y(%d) z(%d) c(%d)", xAxis, yAxis, zAxis,
sdl_orientation_count);
if (zAxis > -30000) {
@@ -74,7 +74,7 @@ static void sdl_accelerometer_handler(void* param) {
sdl_orientation_count++;
if (new_orientation != orientation) {
- dbg(lvl_debug, "x(%d) y(%d) z(%d) o(%d)\n", xAxis, yAxis, zAxis,
+ dbg(lvl_debug, "x(%d) y(%d) z(%d) o(%d)", xAxis, yAxis, zAxis,
new_orientation);
orientation = new_orientation;
@@ -100,7 +100,7 @@ static void sdl_accelerometer_handler(void* param) {
static Uint32 sdl_timer_callback(Uint32 interval, void* param) {
struct event_timeout *timeout = (struct event_timeout*) param;
- dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) fired\n", param, timeout->multi,
+ dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) fired", param, timeout->multi,
interval);
SDL_Event event;
@@ -169,7 +169,7 @@ static void event_sdl_watch_thread(GPtrArray *watch_list) {
for (idx = 0; idx < watch_list->len; idx++) {
if (pfds[idx].revents == pfds[idx].events) { /* The requested event happened, notify mainloop! */
ew = g_ptr_array_index(watch_list, idx);
- dbg(lvl_debug, "watch(%p) event(%d) encountered\n", ew,
+ dbg(lvl_debug, "watch(%p) event(%d) encountered", ew,
pfds[idx].revents);
SDL_Event event;
@@ -194,7 +194,7 @@ static void event_sdl_watch_thread(GPtrArray *watch_list) {
}
static void event_sdl_watch_startthread(GPtrArray *watch_list) {
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
if (sdl_watch_thread)
event_sdl_watch_stopthread();
@@ -206,7 +206,7 @@ static void event_sdl_watch_startthread(GPtrArray *watch_list) {
}
static void event_sdl_watch_stopthread() {
- dbg(lvl_debug, "enter\n");
+ dbg(lvl_debug, "enter");
if (sdl_watch_thread) {
/* Notify the watch thread that the list of FDs will change */
pthread_kill(sdl_watch_thread, SIGUSR1);
@@ -217,7 +217,7 @@ static void event_sdl_watch_stopthread() {
static struct event_watch *
event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb) {
- dbg(lvl_debug, "fd(%d) cond(%x) cb(%x)\n", fd, cond, cb);
+ dbg(lvl_debug, "fd(%d) cond(%x) cb(%x)", fd, cond, cb);
event_sdl_watch_stopthread();
@@ -253,7 +253,7 @@ event_sdl_add_watch(int fd, enum event_watch_cond cond, struct callback *cb) {
}
static void event_sdl_remove_watch(struct event_watch *ew) {
- dbg(lvl_debug, "enter %p\n", ew);
+ dbg(lvl_debug, "enter %p", ew);
event_sdl_watch_stopthread();
@@ -272,7 +272,7 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb) {
struct event_timeout * ret = g_new0(struct event_timeout, 1);
if (!ret)
return ret;
- dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) cb(%p) added\n", ret, multi,
+ dbg(lvl_debug, "timer(%p) multi(%d) interval(%d) cb(%p) added", ret, multi,
timeout, cb);
ret->multi = multi;
ret->cb = cb;
@@ -282,14 +282,14 @@ event_sdl_add_timeout(int timeout, int multi, struct callback *cb) {
}
static void event_sdl_remove_timeout(struct event_timeout *to) {
- dbg(lvl_info, "enter %p\n", to);
+ dbg(lvl_info, "enter %p", to);
if (to != NULL) {
int ret = to->id ? SDL_RemoveTimer(to->id) : SDL_TRUE;
if (ret == SDL_FALSE) {
- dbg(lvl_debug, "SDL_RemoveTimer (%p) failed\n", to->id);
+ dbg(lvl_debug, "SDL_RemoveTimer (%p) failed", to->id);
} else {
g_free(to);
- dbg(lvl_debug, "timer(%p) removed\n", to);
+ dbg(lvl_debug, "timer(%p) removed", to);
}
}
}
@@ -309,7 +309,7 @@ static gint sdl_sort_idle_tasks(gconstpointer parama, gconstpointer paramb) {
static struct event_idle *
event_sdl_add_idle(int priority, struct callback *cb) {
- dbg(lvl_debug, "add idle priority(%d) cb(%p)\n", priority, cb);
+ dbg(lvl_debug, "add idle priority(%d) cb(%p)", priority, cb);
struct idle_task *task = g_new0(struct idle_task, 1);
task->priority = priority;
@@ -321,7 +321,7 @@ event_sdl_add_idle(int priority, struct callback *cb) {
SDL_Event event;
SDL_UserEvent userevent;
- dbg(lvl_debug, "poking eventloop because of new idle_events\n");
+ dbg(lvl_debug, "poking eventloop because of new idle_events");
userevent.type = SDL_USEREVENT;
userevent.code = SDL_USEREVENT_CODE_IDLE_EVENT;
@@ -340,14 +340,14 @@ event_sdl_add_idle(int priority, struct callback *cb) {
}
static void event_sdl_remove_idle(struct event_idle *task) {
- dbg(lvl_debug, "remove task(%p)\n", task);
+ dbg(lvl_debug, "remove task(%p)", task);
g_ptr_array_remove(idle_tasks, (gpointer) task);
}
/* callback */
static void event_sdl_call_callback(struct callback_list *cbl) {
- dbg(lvl_debug, "call_callback cbl(%p)\n", cbl);
+ dbg(lvl_debug, "call_callback cbl(%p)", cbl);
SDL_Event event;
SDL_UserEvent userevent;