diff options
author | Nicholas Rishel <nicholas_rishel> | 2021-07-05 20:10:20 +0300 |
---|---|---|
committer | Nicholas Rishel <rishel.nick@gmail.com> | 2021-07-05 21:00:45 +0300 |
commit | f3ec0d8e58595ef5fae3e2e9c541150db3bd3f1e (patch) | |
tree | bd9d60ecdae0c3963983ceae9cc1a703d5393103 /intern/ghost/test/multitest | |
parent | b66c21f8b0a73c9ad58eb3295b29fe4fadfc4bc8 (diff) |
Replace Ghost integrals with stdint fixed width integers.
Also replace integer with bool in Ghost API when only used as boolean,
and uint8* with char* in Ghost API when variable is a string.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D11617
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
Diffstat (limited to 'intern/ghost/test/multitest')
-rw-r--r-- | intern/ghost/test/multitest/EventToBuf.c | 2 | ||||
-rw-r--r-- | intern/ghost/test/multitest/MultiTest.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/intern/ghost/test/multitest/EventToBuf.c b/intern/ghost/test/multitest/EventToBuf.c index 788c0221753..44ea07bd880 100644 --- a/intern/ghost/test/multitest/EventToBuf.c +++ b/intern/ghost/test/multitest/EventToBuf.c @@ -203,7 +203,7 @@ static char *keytype_to_string(GHOST_TKey key) void event_to_buf(GHOST_EventHandle evt, char buf[128]) { GHOST_TEventType type = GHOST_GetEventType(evt); - double time = (double)((GHOST_TInt64)GHOST_GetEventTime(evt)) / 1000; + double time = (double)((int64_t)GHOST_GetEventTime(evt)) / 1000; GHOST_WindowHandle win = GHOST_GetEventWindow(evt); void *data = GHOST_GetEventData(evt); char *pos = buf; diff --git a/intern/ghost/test/multitest/MultiTest.c b/intern/ghost/test/multitest/MultiTest.c index ccbbbceb5b6..0e6602d9510 100644 --- a/intern/ghost/test/multitest/MultiTest.c +++ b/intern/ghost/test/multitest/MultiTest.c @@ -302,12 +302,12 @@ static void mainwindow_handle(void *priv, GHOST_EventHandle evt) /**/ -static void mainwindow_timer_proc(GHOST_TimerTaskHandle task, GHOST_TUns64 time) +static void mainwindow_timer_proc(GHOST_TimerTaskHandle task, uint64_t time) { MainWindow *mw = GHOST_GetTimerTaskUserData(task); char buf[64]; - sprintf(buf, "timer: %6.2f", (double)((GHOST_TInt64)time) / 1000); + sprintf(buf, "timer: %6.2f", (double)((int64_t)time) / 1000); mainwindow_log(mw, buf); } @@ -570,7 +570,7 @@ LoggerWindow *loggerwindow_new(MultiTestApp *app) { GHOST_GLSettings glSettings = {0}; GHOST_SystemHandle sys = multitestapp_get_system(app); - GHOST_TUns32 screensize[2]; + uint32_t screensize[2]; GHOST_WindowHandle win; GHOST_GetMainDisplayDimensions(sys, &screensize[0], &screensize[1]); @@ -701,11 +701,11 @@ static void extrawindow_do_key(ExtraWindow *ew, GHOST_TKey key, int press) } } -static void extrawindow_spin_cursor(ExtraWindow *ew, GHOST_TUns64 time) +static void extrawindow_spin_cursor(ExtraWindow *ew, uint64_t time) { - GHOST_TUns8 bitmap[16][2]; - GHOST_TUns8 mask[16][2]; - double ftime = (double)((GHOST_TInt64)time) / 1000; + uint8_t bitmap[16][2]; + uint8_t mask[16][2]; + double ftime = (double)((int64_t)time) / 1000; float angle = fmod(ftime, 1.0) * 3.1415 * 2; int i; |