Core: Use move semantics for Renderer::SaveScreenshot

This commit is contained in:
Silent 2019-08-26 19:31:29 +02:00
parent ff8f978eaf
commit 37ef5a54c9
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
2 changed files with 3 additions and 3 deletions

View File

@ -369,12 +369,12 @@ Renderer::ConvertStereoRectangle(const MathUtil::Rectangle<int>& rc) const
return std::make_tuple(left_rc, right_rc);
}
void Renderer::SaveScreenshot(const std::string& filename, bool wait_for_completion)
void Renderer::SaveScreenshot(std::string filename, bool wait_for_completion)
{
// 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 = filename;
m_screenshot_name = std::move(filename);
m_screenshot_request.Set();
}

View File

@ -196,7 +196,7 @@ public:
float EFBToScaledYf(float y) const;
// Random utilities
void SaveScreenshot(const std::string& filename, bool wait_for_completion);
void SaveScreenshot(std::string filename, bool wait_for_completion);
void DrawDebugText();
// ImGui initialization depends on being able to create textures and pipelines, so do it last.