mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 04:31:34 +08:00
Update example homescreen. Wait for the thread to join. (#129)
This commit is contained in:
parent
8e98928c0c
commit
2ea480f4f6
@ -360,8 +360,9 @@ int main(int argc, const char* argv[]) {
|
||||
});
|
||||
});
|
||||
|
||||
std::thread update([&screen, &shift]() {
|
||||
for (;;) {
|
||||
bool refresh_ui_continue = true;
|
||||
std::thread refresh_ui([&] {
|
||||
while(refresh_ui_continue) {
|
||||
using namespace std::chrono_literals;
|
||||
std::this_thread::sleep_for(0.05s);
|
||||
shift++;
|
||||
@ -370,6 +371,8 @@ int main(int argc, const char* argv[]) {
|
||||
});
|
||||
|
||||
screen.Loop(main_renderer);
|
||||
refresh_ui_continue = false;
|
||||
refresh_ui.join();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user