mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 16:49:27 +01:00
Outputs: Begin the UI frame after binding, and scissor to the output
UIContext::BeginFrame sets the scissor, which on Vulkan needs a bound render target, and sets it to the primary's size. In portrait, that cut the TV's menu message off past the phone's width. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
014f6dceea
commit
3b1432d851
1 file changed
+2
-3
@@ -282,9 +282,6 @@ ScreenRenderFlags ScreenManager::Render(std::function<void()> afterPreRender) {
|
||||
|
||||
// Secondary outputs. The topmost screen with something for one draws it, then the background screen.
|
||||
UIContext *ui = getUIContext();
|
||||
if (!outputs_.empty()) {
|
||||
ui->BeginFrame();
|
||||
}
|
||||
for (const Output &output : outputs_) {
|
||||
Draw::Swapchain *swapchain = output.display.swapchain;
|
||||
if (!swapchain) {
|
||||
@@ -293,6 +290,8 @@ ScreenRenderFlags ScreenManager::Render(std::function<void()> afterPreRender) {
|
||||
draw_->BindFramebufferAsRenderTarget(swapchain, {RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR}, "Output");
|
||||
int w, h;
|
||||
draw_->GetFramebufferDimensions(swapchain, &w, &h);
|
||||
// Only with a render target bound, since it sets the scissor. That's to the primary's size, so ours goes after.
|
||||
ui->BeginFrame();
|
||||
draw_->SetViewport(Draw::Viewport{0.0f, 0.0f, (float)w, (float)h, 0.0f, 1.0f});
|
||||
draw_->SetScissorRect(0, 0, w, h);
|
||||
|
||||
|
||||
Reference in new issue
Block a user