From c13cb113131dea2f9b6521b95db846b8eaf22115 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/window.cpp b/src/window.cpp index 443dfc0..50aeed9 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); @@ -93,6 +94,8 @@ Window::Window() { 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);