]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fade fix (kinda)
authorClyne Sullivan <tullivan99@gmail.com>
Fri, 20 Jan 2017 15:49:11 +0000 (10:49 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Fri, 20 Jan 2017 15:49:11 +0000 (10:49 -0500)
main.cpp

index 30e19f90f30b209aa745cb4919d93ce23201457a..dd84788acc1c7521b32f3a6e47dfff5753732020 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -146,7 +146,7 @@ int main(int argc, char *argv[])
                                worldShade = 50 * sin((game::time::getTickCount() + (DAY_CYCLE / 2)) / (DAY_CYCLE / PI));
 
                                // update fades
-                               ui::fadeUpdate();
+                               //ui::fadeUpdate();
 
                                // increment game ticker
                                game::time::tick();
@@ -169,6 +169,11 @@ int main(int argc, char *argv[])
                        std::this_thread::sleep_for(1s);
                });
 
+               GameThread gtFade ([&] {
+                       ui::fadeUpdate();
+                       std::this_thread::sleep_for(20ms);
+               });
+
                // the render loop, renders
                const bool &run = game::engine.shouldRun;
                while (run) {