Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/test/multitest/EventToBuf.c')
-rw-r--r--intern/ghost/test/multitest/EventToBuf.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/intern/ghost/test/multitest/EventToBuf.c b/intern/ghost/test/multitest/EventToBuf.c
index 034fbe04447..0eb37a58be2 100644
--- a/intern/ghost/test/multitest/EventToBuf.c
+++ b/intern/ghost/test/multitest/EventToBuf.c
@@ -203,33 +203,36 @@ void event_to_buf(GHOST_EventHandle evt, char buf[128])
void *data= GHOST_GetEventData(evt);
char *pos= buf;
- pos+= sprintf(pos, "event: %6.2f, %16s", time, eventtype_to_string(type));
+ pos += sprintf(pos, "event: %6.2f, %16s", time, eventtype_to_string(type));
if (win) {
char *s= GHOST_GetTitle(win);
- pos+= sprintf(pos, " - win: %s", s);
+ pos += sprintf(pos, " - win: %s", s);
free(s);
} else {
pos+= sprintf(pos, " - sys evt");
}
switch (type) {
- case GHOST_kEventCursorMove: {
- GHOST_TEventCursorData *cd= data;
- pos+= sprintf(pos, " - pos: (%d, %d)", cd->x, cd->y);
- break;
- }
- case GHOST_kEventButtonDown:
- case GHOST_kEventButtonUp: {
- GHOST_TEventButtonData *bd= data;
- pos+= sprintf(pos, " - but: %d", bd->button);
- break;
- }
-
- case GHOST_kEventKeyDown:
- case GHOST_kEventKeyUp: {
- GHOST_TEventKeyData *kd= data;
- pos+= sprintf(pos, " - key: %s (%d)", keytype_to_string(kd->key), kd->key);
- if (kd->ascii) pos+= sprintf(pos, " ascii: '%c' (%d)", kd->ascii, kd->ascii);
- break;
- }
+ case GHOST_kEventCursorMove:
+ {
+ GHOST_TEventCursorData *cd= data;
+ pos += sprintf(pos, " - pos: (%d, %d)", cd->x, cd->y);
+ break;
+ }
+ case GHOST_kEventButtonDown:
+ case GHOST_kEventButtonUp:
+ {
+ GHOST_TEventButtonData *bd= data;
+ pos += sprintf(pos, " - but: %d", bd->button);
+ break;
+ }
+
+ case GHOST_kEventKeyDown:
+ case GHOST_kEventKeyUp:
+ {
+ GHOST_TEventKeyData *kd= data;
+ pos += sprintf(pos, " - key: %s (%d)", keytype_to_string(kd->key), kd->key);
+ if (kd->ascii) pos+= sprintf(pos, " ascii: '%c' (%d)", kd->ascii, kd->ascii);
+ break;
+ }
}
}