mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #6216 from stenzek/headless-frame-dumping
OGL: Fix headless frame dumping
This commit is contained in:
@ -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();
|
||||
|
@ -94,6 +94,7 @@ public:
|
||||
|
||||
const TargetRectangle& GetTargetRectangle() const { return m_target_rectangle; }
|
||||
float CalculateDrawAspectRatio() const;
|
||||
bool IsHeadless() const;
|
||||
|
||||
std::tuple<float, float> ScaleToDisplayAspectRatio(int width, int height) const;
|
||||
void UpdateDrawRectangle();
|
||||
@ -176,9 +177,10 @@ protected:
|
||||
|
||||
static const float GX_MAX_DEPTH;
|
||||
|
||||
void* m_surface_handle = nullptr;
|
||||
void* m_new_surface_handle = nullptr;
|
||||
Common::Flag m_surface_needs_change;
|
||||
Common::Event m_surface_changed;
|
||||
void* m_new_surface_handle = nullptr;
|
||||
|
||||
u32 m_last_host_config_bits = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user