Comment fixes, adjust a couple of sleeps

This commit is contained in:
Henrik Rydgård 2023-08-13 17:55:30 +02:00
parent 7bb1914fd3
commit a84cb357dc
2 changed files with 3 additions and 11 deletions

View file

@ -210,7 +210,7 @@ std::string PathBrowser::GetFriendlyPath() const {
bool PathBrowser::GetListing(std::vector<File::FileInfo> &fileInfo, const char *filter, bool *cancel) {
std::unique_lock<std::mutex> guard(pendingLock_);
while (!IsListingReady() && (!cancel || !*cancel)) {
// In case cancel changes, just sleep.
// In case cancel changes, just sleep. TODO: Replace with condition variable.
guard.unlock();
sleep_ms(50);
guard.lock();
@ -221,14 +221,6 @@ bool PathBrowser::GetListing(std::vector<File::FileInfo> &fileInfo, const char *
}
bool PathBrowser::CanNavigateUp() {
/* Leaving this commented out, not sure if there's a use in UWP for navigating up from the user data folder.
#if PPSSPP_PLATFORM(UWP)
// Can't navigate up from memstick folder :(
if (path_ == GetSysDirectory(DIRECTORY_MEMSTICK_ROOT)) {
return false;
}
#endif
*/
return path_.CanNavigateUp();
}

View file

@ -311,7 +311,7 @@ static void EmuThreadFunc() {
// Wait for render loop to get started.
INFO_LOG(SYSTEM, "Runloop: Waiting for displayInit...");
while (!graphicsContext || graphicsContext->GetState() == GraphicsContextState::PENDING) {
sleep_ms(20);
sleep_ms(5);
}
// Check the state of the graphics context before we try to feed it into NativeInitGraphics.
@ -1311,7 +1311,7 @@ extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeActivity_requestExitVulkanR
}
exitRenderLoop = true;
while (renderLoopRunning) {
sleep_ms(10);
sleep_ms(5);
}
}