Core: Use move semantics for Renderer::SaveScreenshot
This commit is contained in:
parent
ff8f978eaf
commit
37ef5a54c9
|
@ -369,12 +369,12 @@ Renderer::ConvertStereoRectangle(const MathUtil::Rectangle<int>& rc) const
|
||||||
return std::make_tuple(left_rc, right_rc);
|
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.
|
// We must not hold the lock while waiting for the screenshot to complete.
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(m_screenshot_lock);
|
std::lock_guard<std::mutex> lk(m_screenshot_lock);
|
||||||
m_screenshot_name = filename;
|
m_screenshot_name = std::move(filename);
|
||||||
m_screenshot_request.Set();
|
m_screenshot_request.Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ public:
|
||||||
float EFBToScaledYf(float y) const;
|
float EFBToScaledYf(float y) const;
|
||||||
|
|
||||||
// Random utilities
|
// Random utilities
|
||||||
void SaveScreenshot(const std::string& filename, bool wait_for_completion);
|
void SaveScreenshot(std::string filename, bool wait_for_completion);
|
||||||
void DrawDebugText();
|
void DrawDebugText();
|
||||||
|
|
||||||
// ImGui initialization depends on being able to create textures and pipelines, so do it last.
|
// ImGui initialization depends on being able to create textures and pipelines, so do it last.
|
||||||
|
|
Loading…
Reference in New Issue