Explorar el Código

SDL_GPU backend: Log initialization error messages

Michael Ragazzon hace 4 meses
padre
commit
d1ca8f6e96
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      Backends/RmlUi_Backend_SDL_GPU.cpp

+ 7 - 1
Backends/RmlUi_Backend_SDL_GPU.cpp

@@ -79,7 +79,7 @@ bool Backend::Initialize(const char* window_name, int width, int height, bool al
 
 
 	if (!window)
 	if (!window)
 	{
 	{
-		Rml::Log::Message(Rml::Log::LT_ERROR, "SDL error on create window: %s\n", SDL_GetError());
+		Rml::Log::Message(Rml::Log::LT_ERROR, "SDL error on create window: %s", SDL_GetError());
 		return false;
 		return false;
 	}
 	}
 
 
@@ -92,10 +92,16 @@ bool Backend::Initialize(const char* window_name, int width, int height, bool al
 	SDL_DestroyProperties(props);
 	SDL_DestroyProperties(props);
 
 
 	if (!device)
 	if (!device)
+	{
+		Rml::Log::Message(Rml::Log::LT_ERROR, "SDL error on create GPU device: %s", SDL_GetError());
 		return false;
 		return false;
+	}
 
 
 	if (!SDL_ClaimWindowForGPUDevice(device, window))
 	if (!SDL_ClaimWindowForGPUDevice(device, window))
+	{
+		Rml::Log::Message(Rml::Log::LT_ERROR, "SDL error on claiming window for GPU device: %s", SDL_GetError());
 		return false;
 		return false;
+	}
 
 
 	data = Rml::MakeUnique<BackendData>(device, window);
 	data = Rml::MakeUnique<BackendData>(device, window);
 	data->window = window;
 	data->window = window;