Bind non-Windows platform services explicitly

This commit is contained in:
2026-06-17 10:02:58 +02:00
parent ea1845d924
commit f98e4f4889
11 changed files with 123 additions and 40 deletions

View File

@@ -16,7 +16,6 @@
#include "platform_windows/windows_platform_services.h"
#endif
#include "platform_legacy/legacy_platform_state.h"
#include "platform_legacy/legacy_platform_services.h"
#include "renderer_gl/opengl_capabilities.h"
namespace {
@@ -48,12 +47,10 @@ namespace {
[[nodiscard]] pp::platform::PlatformServices& active_platform_services(const App* app)
{
if (app)
{
if (auto* services = app->platform_services())
return *services;
}
return pp::platform::legacy::platform_services();
assert(app);
auto* services = app->platform_services();
assert(services);
return *services;
}
}