diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/extantz/extantz.c | 2 | ||||
-rw-r--r-- | src/libraries/love.h | 1 | ||||
-rw-r--r-- | src/love/love.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index e611e4d..4f5d9ea 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -150,7 +150,7 @@ static void _onWorldClick(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void | |||
150 | char SID[64]; | 150 | char SID[64]; |
151 | 151 | ||
152 | // CUBE_UUID.events.touch_start(1), but we just make one up for now. | 152 | // CUBE_UUID.events.touch_start(1), but we just make one up for now. |
153 | snprintf(SID, sizeof(SID), "%08lx-%04lx-%04lx-%04lx-%012lx", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); | 153 | snprintf(SID, sizeof(SID), FAKE_UUID); |
154 | sendForth(ourGlobals.server, SID, "events.touch_start(1)"); | 154 | sendForth(ourGlobals.server, SID, "events.touch_start(1)"); |
155 | } | 155 | } |
156 | } | 156 | } |
diff --git a/src/libraries/love.h b/src/libraries/love.h index cbd4c80..cf23f3c 100644 --- a/src/libraries/love.h +++ b/src/libraries/love.h | |||
@@ -83,6 +83,7 @@ love needs | |||
83 | 83 | ||
84 | #include "Runnr.h" | 84 | #include "Runnr.h" |
85 | 85 | ||
86 | #define FAKE_UUID "%08lx-%04lx-%04lx-%04lx-%012lx", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random() | ||
86 | 87 | ||
87 | typedef struct _vec4 | 88 | typedef struct _vec4 |
88 | { | 89 | { |
diff --git a/src/love/love.c b/src/love/love.c index dc27d9c..7d50917 100644 --- a/src/love/love.c +++ b/src/love/love.c | |||
@@ -146,7 +146,7 @@ static void dirList_compile(const char *name, const char *path, void *data) | |||
146 | 146 | ||
147 | scriptCount++; | 147 | scriptCount++; |
148 | gettimeofday(&me->startTime, NULL); | 148 | gettimeofday(&me->startTime, NULL); |
149 | snprintf(me->SID, sizeof(me->SID), "%08lx-%04lx-%04lx-%04lx-%012lx", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); | 149 | snprintf(me->SID, sizeof(me->SID), FAKE_UUID); |
150 | snprintf(me->fileName, sizeof(me->fileName), "%s/%s", path, name); | 150 | snprintf(me->fileName, sizeof(me->fileName), "%s/%s", path, name); |
151 | eina_hash_add(ourGlobals->scripts, me->SID, me); | 151 | eina_hash_add(ourGlobals->scripts, me->SID, me); |
152 | sendForth(ourGlobals->serverLuaSL, me->SID, "compile(%s)", me->fileName); | 152 | sendForth(ourGlobals->serverLuaSL, me->SID, "compile(%s)", me->fileName); |
@@ -431,7 +431,7 @@ static Eina_Bool _dataLuaSL(void *data, int type, Ecore_Con_Event_Server_Data *e | |||
431 | } | 431 | } |
432 | } while (temp && (0 < lineNo--)); | 432 | } while (temp && (0 < lineNo--)); |
433 | 433 | ||
434 | sprintf(key, "%08lx-%04lx-%04lx-%04lx-%012lx", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); | 434 | sprintf(key, FAKE_UUID); |
435 | sendForth(ourGlobals->serverLuaSL, SID, "return \"%s\"", key); | 435 | sendForth(ourGlobals->serverLuaSL, SID, "return \"%s\"", key); |
436 | 436 | ||
437 | // TODO - For now, just send it to everyone. | 437 | // TODO - For now, just send it to everyone. |