diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2025-11-13 21:44:29 -0600 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2025-11-20 00:35:01 -0600 |
| commit | a4599a1adda5c1d445b70d0dfe70b50fe3888662 (patch) | |
| tree | e9989a4c9ea04d84b1ce44dde2746940362bc752 /Source/Core/VideoCommon/BPFunctions.cpp | |
| parent | 2acb49544cdc7f5bd937f56ca5771d52ab336528 (diff) | |
VideoCommon: avoid assuming global state exists for 'EndUtilityDrawing', use last stored viewport/scissor rect instead
Diffstat (limited to 'Source/Core/VideoCommon/BPFunctions.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPFunctions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/BPFunctions.cpp b/Source/Core/VideoCommon/BPFunctions.cpp index 660d85c598..134a14f8d4 100644 --- a/Source/Core/VideoCommon/BPFunctions.cpp +++ b/Source/Core/VideoCommon/BPFunctions.cpp @@ -265,6 +265,14 @@ void SetScissorAndViewport(FramebufferManager* frame_buffer_manager, ScissorPos y = static_cast<float>(g_gfx->GetCurrentFramebuffer()->GetHeight()) - y - height; g_gfx->SetViewport(x, y, width, height, near_depth, far_depth); + + g_gfx->StoreViewportAndScissor(AbstractGfx::ViewportAndScissor{.scissor_rect = converted_rc, + .viewport_x = x, + .viewport_y = y, + .viewport_width = width, + .viewport_height = height, + .viewport_near_depth = near_depth, + .viewport_far_depth = far_depth}); } void SetDepthMode() |
