| 345 | } |
| 346 | |
| 347 | int ProgressBarStart(const char * windowText) |
| 348 | { |
| 349 | // progress bar currently interfering with fullscreen so disable |
| 350 | if (IsWindowFullscreen()) |
| 351 | return -1; |
| 352 | |
| 353 | for (int i = 0; i < g_ProgressSlotCount; i++) |
| 354 | { |
| 355 | std::lock_guard guard(g_ProgressSlots[i].Mutex); |
| 356 | ProgressBarGlobals & slot = g_ProgressSlots[i]; |
| 357 | if (!slot.Active) |
| 358 | { |
| 359 | slot.Active = true; |
| 360 | slot.Title = windowText; |
| 361 | slot.Value = 0; |
| 362 | assert(!slot.Thread.joinable()); |
| 363 | |
| 364 | slot.Thread = std::thread(ShowProgressWindow, i); |
| 365 | return i; |
| 366 | } |
| 367 | } |
| 368 | return -1; |
| 369 | } |
| 370 | |
| 371 | void ProgressBarStop(int slotIndex) |
| 372 | { |
no test coverage detected