Find the first request that has is RESULT_PENDING and try to load it Continue until all requests are checked or we have created a one resource
| 761 | // Find the first request that has is RESULT_PENDING and try to load it |
| 762 | // Continue until all requests are checked or we have created a one resource |
| 763 | static bool PreloaderUpdateOneItem(HPreloader preloader, TRequestIndex index) |
| 764 | { |
| 765 | DM_PROFILE("PreloaderUpdateOneItem"); |
| 766 | while (index >= 0) |
| 767 | { |
| 768 | PreloadRequest* req = &preloader->m_Request[index]; |
| 769 | switch (req->m_LoadResult) |
| 770 | { |
| 771 | case RESULT_PENDING: |
| 772 | if (DoPreloaderUpdateOneReq(preloader, index, req)) |
| 773 | { |
| 774 | return true; |
| 775 | } |
| 776 | break; |
| 777 | case RESULT_RESOURCE_LOOP_ERROR: |
| 778 | if (PreloaderTryPruneParent(preloader, req)) |
| 779 | { |
| 780 | return true; |
| 781 | } |
| 782 | break; |
| 783 | default: |
| 784 | break; |
| 785 | } |
| 786 | index = req->m_NextSibling; |
| 787 | } |
| 788 | return false; |
| 789 | } |
| 790 | |
| 791 | // Returns true if the item or any of its children is found that has completed its loading from the load queue |
| 792 | static bool DoPreloaderUpdateOneReq(HPreloader preloader, TRequestIndex index, PreloadRequest* req) |
no test coverage detected