Fix Apple platform target link surface

This commit is contained in:
2026-06-17 15:16:01 +02:00
parent 624f1bb99d
commit 0249ecab28
3 changed files with 37 additions and 2 deletions

View File

@@ -24,6 +24,15 @@ namespace pp::platform::apple {
namespace {
void log_apple_platform_message(const char* format, ...)
{
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
fputc('\n', stderr);
va_end(args);
}
[[nodiscard]] std::vector<std::string> apple_image_file_types()
{
static constexpr std::array<std::string_view, 5> kFileTypes = {
@@ -300,7 +309,9 @@ void ApplePlatformServices::log_stacktrace()
{
#if defined(__OSX__)
NSString* callstack = [[NSThread callStackSymbols] componentsJoinedByString:@"\n"];
LOG("callstack:\n%s", [callstack cStringUsingEncoding:NSUTF8StringEncoding]);
log_apple_platform_message(
"callstack:\n%s",
[callstack cStringUsingEncoding:NSUTF8StringEncoding]);
#endif
}
@@ -378,7 +389,9 @@ void ApplePlatformServices::apply_render_platform_hints()
.enable = pp::legacy::ui_gl::enable_opengl_state,
});
if (!status.ok())
LOG("OpenGL legacy render platform hints failed: %s", status.message);
log_apple_platform_message(
"OpenGL legacy render platform hints failed: %s",
status.message);
#endif
}

View File

@@ -1,3 +1,4 @@
#include "pch.h"
#include "platform_apple/apple_platform_services.h"
#include "platform_legacy/legacy_platform_state.h"