From 6e7379937d6cab9688474a9b559c8ea05d5a59a9 Mon Sep 17 00:00:00 2001 From: Warwick New Date: Fri, 31 Jul 2026 13:51:18 +0100 Subject: [PATCH] Switched some error messages to use sdl's logging system --- src/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 443dfc0..a2d5a65 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -73,7 +73,8 @@ Window::Window() { [this](wgpu::RequestAdapterStatus status, wgpu::Adapter a, wgpu::StringView message) { if (status != wgpu::RequestAdapterStatus::Success) { - std::cout << "RequestAdapter: " << message << "\n"; + SDL_LogError(SDL_LOG_CATEGORY_ERROR, "Could not get WGPU adapter: %s", + message.data); exit(0); } adapter = std::move(a); @@ -92,7 +93,8 @@ Window::Window() { [this](wgpu::RequestDeviceStatus status, wgpu::Device d, wgpu::StringView message) { if (status != wgpu::RequestDeviceStatus::Success) { - std::cout << "RequestDevice: " << message << "\n"; + SDL_LogError(SDL_LOG_CATEGORY_ERROR, "Could not get WGPU device: %s", + message.data); exit(0); } device = std::move(d);