mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
OGL: Fix headless frame dumping
Also skips swapping the window system buffers in headless mode, as there may not be a surface which can be swapped in the first place. Instead, we call glFlush() at the end of a frame in this case.
This commit is contained in:
parent
ab44536a3c
commit
32125cf181
5 changed files with 48 additions and 24 deletions
|
@ -94,6 +94,7 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height)
|
|||
if (SConfig::GetInstance().bWii)
|
||||
m_aspect_wide = Config::Get(Config::SYSCONF_WIDESCREEN);
|
||||
|
||||
m_surface_handle = Host_GetRenderHandle();
|
||||
m_last_host_config_bits = ShaderHostConfig::GetCurrent().bits;
|
||||
}
|
||||
|
||||
|
@ -400,6 +401,11 @@ float Renderer::CalculateDrawAspectRatio() const
|
|||
}
|
||||
}
|
||||
|
||||
bool Renderer::IsHeadless() const
|
||||
{
|
||||
return !m_surface_handle;
|
||||
}
|
||||
|
||||
std::tuple<float, float> Renderer::ScaleToDisplayAspectRatio(const int width,
|
||||
const int height) const
|
||||
{
|
||||
|
@ -711,7 +717,7 @@ void Renderer::DoDumpFrame()
|
|||
void Renderer::UpdateFrameDumpTexture()
|
||||
{
|
||||
int target_width, target_height;
|
||||
if (!g_ActiveConfig.bInternalResolutionFrameDumps)
|
||||
if (!g_ActiveConfig.bInternalResolutionFrameDumps && !IsHeadless())
|
||||
{
|
||||
auto target_rect = GetTargetRectangle();
|
||||
target_width = target_rect.GetWidth();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue