diff options
| author | Ray <[email protected]> | 2019-09-13 17:10:26 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-09-13 17:10:26 +0200 |
| commit | 00bb426fb2cd5f692d375480736a32d5d522020e (patch) | |
| tree | 980d983362bdefa09c59f1a25dac1cd5da8e1b4c /examples | |
| parent | a952c462991da81f147f12a2cfdc9ff1c4125152 (diff) | |
| download | raylib.com-00bb426fb2cd5f692d375480736a32d5d522020e.tar.gz raylib.com-00bb426fb2cd5f692d375480736a32d5d522020e.zip | |
Update to work on web
Some weird issue, timeCounter does not work properly inside function loop, despite being update, while() loop always returns true!
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/web/core/core_loading_thread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/web/core/core_loading_thread.c b/examples/web/core/core_loading_thread.c index 64e34e0..2eb317f 100644 --- a/examples/web/core/core_loading_thread.c +++ b/examples/web/core/core_loading_thread.c @@ -29,6 +29,9 @@ static void *LoadDataThread(void *arg); // Loading data thread function decl static int dataProgress = 0; // Data progress accumulator +// NOTE: On PLATFORM_WEB, if timeCounter is a local variable while() condition is never true... weird... +static int timeCounter = 0; // Time counted in ms + //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -154,7 +157,6 @@ void UpdateDrawFrame(void) // Loading data thread function definition static void *LoadDataThread(void *arg) { - int timeCounter = 0; // Time counted in ms clock_t prevTime = clock(); // Previous time // We simulate data loading with a time counter for 5 seconds |
