1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

More efficiently search viewports for playing Audio

This commit is contained in:
Harry Hopkinson
2025-05-23 12:59:55 +01:00
parent 371dcc28f5
commit 994cc858e8
6 changed files with 15 additions and 21 deletions

View File

@@ -916,18 +916,6 @@ static constexpr float kWindowScrollLocations[][2] = {
});
}
std::vector<Viewport*> WindowGetActiveViewports()
{
std::vector<Viewport*> viewports;
WindowVisitEach([&viewports](WindowBase* w) {
if (w->viewport != nullptr && !(w->flags & WF_DEAD))
{
viewports.push_back(w->viewport);
}
});
return viewports;
}
Viewport* WindowGetPreviousViewport(Viewport* current)
{
bool foundPrevious = (current == nullptr);