mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Remove wait_for_completion parameter from Renderer::SaveScreenshot
This is now unused. Seems like it was an improper fix (there would be a race if saving the screenshot took longer than 2 seconds) back when it was used too.
This commit is contained in:
@ -378,20 +378,11 @@ Renderer::ConvertStereoRectangle(const MathUtil::Rectangle<int>& rc) const
|
||||
return std::make_tuple(left_rc, right_rc);
|
||||
}
|
||||
|
||||
void Renderer::SaveScreenshot(std::string filename, bool wait_for_completion)
|
||||
void Renderer::SaveScreenshot(std::string filename)
|
||||
{
|
||||
// We must not hold the lock while waiting for the screenshot to complete.
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(m_screenshot_lock);
|
||||
m_screenshot_name = std::move(filename);
|
||||
m_screenshot_request.Set();
|
||||
}
|
||||
|
||||
if (wait_for_completion)
|
||||
{
|
||||
// This is currently only used by Android, and it was using a wait time of 2 seconds.
|
||||
m_screenshot_completed.WaitFor(std::chrono::seconds(2));
|
||||
}
|
||||
std::lock_guard<std::mutex> lk(m_screenshot_lock);
|
||||
m_screenshot_name = std::move(filename);
|
||||
m_screenshot_request.Set();
|
||||
}
|
||||
|
||||
void Renderer::CheckForConfigChanges()
|
||||
|
@ -199,7 +199,7 @@ public:
|
||||
float EFBToScaledYf(float y) const;
|
||||
|
||||
// Random utilities
|
||||
void SaveScreenshot(std::string filename, bool wait_for_completion);
|
||||
void SaveScreenshot(std::string filename);
|
||||
void DrawDebugText();
|
||||
|
||||
virtual void ClearScreen(const MathUtil::Rectangle<int>& rc, bool colorEnable, bool alphaEnable,
|
||||
|
Reference in New Issue
Block a user