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')
-rw-r--r--intern/ghost/test/multitest/EventToBuf.c6
-rw-r--r--intern/ghost/test/multitest/MultiTest.c25
2 files changed, 19 insertions, 12 deletions
diff --git a/intern/ghost/test/multitest/EventToBuf.c b/intern/ghost/test/multitest/EventToBuf.c
index baab32328c3..846a867a371 100644
--- a/intern/ghost/test/multitest/EventToBuf.c
+++ b/intern/ghost/test/multitest/EventToBuf.c
@@ -218,8 +218,10 @@ void event_to_buf(GHOST_EventHandle evt, char buf[128])
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);
+ /* TODO: ideally this would print the unicode character. */
+ if (kd->utf8_buf[0]) {
+ pos += sprintf(pos, " ascii: '%c' (%d)", kd->utf8_buf[0], kd->utf8_buf[0]);
+ }
break;
}
}
diff --git a/intern/ghost/test/multitest/MultiTest.c b/intern/ghost/test/multitest/MultiTest.c
index 157e4f1b0f2..99b88dfb525 100644
--- a/intern/ghost/test/multitest/MultiTest.c
+++ b/intern/ghost/test/multitest/MultiTest.c
@@ -179,37 +179,44 @@ static void mainwindow_do_key(MainWindow *mw, GHOST_TKey key, int press)
{
switch (key) {
case GHOST_kKeyC:
- if (press)
+ if (press) {
GHOST_SetCursorShape(mw->win,
(GHOST_TStandardCursor)(rand() % (GHOST_kStandardCursorNumCursors)));
+ }
break;
case GHOST_kKeyLeftBracket:
- if (press)
+ if (press) {
GHOST_SetCursorVisibility(mw->win, 0);
+ }
break;
case GHOST_kKeyRightBracket:
- if (press)
+ if (press) {
GHOST_SetCursorVisibility(mw->win, 1);
+ }
break;
case GHOST_kKeyE:
- if (press)
+ if (press) {
multitestapp_toggle_extra_window(mw->app);
+ }
break;
case GHOST_kKeyQ:
- if (press)
+ if (press) {
multitestapp_exit(mw->app);
+ }
break;
case GHOST_kKeyT:
- if (press)
+ if (press) {
mainwindow_log(mw, "TextTest~|`hello`\"world\",<>/");
+ }
break;
case GHOST_kKeyR:
if (press) {
int i;
mainwindow_log(mw, "Invalidating window 10 times");
- for (i = 0; i < 10; i++)
+ for (i = 0; i < 10; i++) {
GHOST_InvalidateWindow(mw->win);
+ }
}
break;
case GHOST_kKeyF11:
@@ -328,9 +335,7 @@ MainWindow *mainwindow_new(MultiTestApp *app)
return mw;
}
- else {
- return NULL;
- }
+ return NULL;
}
void mainwindow_free(MainWindow *mw)