mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Fix annoying little flicker when starting a game.
This commit is contained in:
1 parent
4788221251
commit
8bfdf7b1b2
3 files changed
+8
-3
No files matched your search
+3
-1
@@ -320,11 +320,13 @@ void EmuScreen::sendMessage(const char *message, const char *value) {
|
||||
// We will push MainScreen in update().
|
||||
PSP_Shutdown();
|
||||
bootPending_ = false;
|
||||
stopRender_ = true;
|
||||
invalid_ = true;
|
||||
host->UpdateDisassembly();
|
||||
} else if (!strcmp(message, "reset")) {
|
||||
PSP_Shutdown();
|
||||
bootPending_ = true;
|
||||
stopRender_ = true;
|
||||
invalid_ = true;
|
||||
host->UpdateDisassembly();
|
||||
|
||||
@@ -987,7 +989,7 @@ void EmuScreen::postRender() {
|
||||
Draw::DrawContext *draw = screenManager()->getDrawContext();
|
||||
if (!draw)
|
||||
return;
|
||||
if (invalid_)
|
||||
if (stopRender_)
|
||||
draw->WipeQueue();
|
||||
draw->EndFrame();
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ private:
|
||||
// Something invalid was loaded, don't try to emulate
|
||||
bool invalid_;
|
||||
bool quit_;
|
||||
bool stopRender_ = false;
|
||||
std::string errorMessage_;
|
||||
|
||||
// If set, pauses at the end of the frame.
|
||||
|
||||
@@ -227,6 +227,9 @@ void VulkanRenderManager::StopThread() {
|
||||
Crash();
|
||||
}
|
||||
frameData.readyForRun = false;
|
||||
for (size_t i = 0; i < frameData.steps.size(); i++) {
|
||||
delete frameData.steps[i];
|
||||
}
|
||||
frameData.steps.clear();
|
||||
|
||||
std::unique_lock<std::mutex> lock(frameData.push_mutex);
|
||||
@@ -803,8 +806,7 @@ void VulkanRenderManager::EndSubmitFrame(int frame) {
|
||||
present.waitSemaphoreCount = 1;
|
||||
|
||||
VkResult res = vkQueuePresentKHR(vulkan_->GetGraphicsQueue(), &present);
|
||||
// TODO: Deal with the VK_SUBOPTIMAL_WSI and VK_ERROR_OUT_OF_DATE_WSI
|
||||
// return codes
|
||||
// TODO: Deal with VK_SUBOPTIMAL_WSI ?
|
||||
if (res == VK_ERROR_OUT_OF_DATE_KHR) {
|
||||
// ignore, it'll be fine. this happens sometimes during resizes, and we do make sure to recreate the swap chain.
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user