From 1978896085b5cff80ec3a8722c437ea890dc1b14 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Tue, 25 Aug 2026 23:21:50 +0100 Subject: [PATCH] Use SDL3 logging level directly, rather than verbosity/debugging booleans. --- Gaming/Game.cs | 4 ++-- Gaming/Wrapper.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gaming/Game.cs b/Gaming/Game.cs index a3580be..e28cf89 100644 --- a/Gaming/Game.cs +++ b/Gaming/Game.cs @@ -9,9 +9,9 @@ using System.Linq; using System.Runtime.InteropServices; - public abstract class Game(bool verbose = false) : Device + public abstract class Game(SDL.LogPriority logging) : Device { - private readonly Wrapper _wrapper = new(verbose); + private readonly Wrapper _wrapper = new(logging); private readonly SDL.PixelFormat _pixelType = SDL.PixelFormat.ARGB8888; private bool _vsync; diff --git a/Gaming/Wrapper.cs b/Gaming/Wrapper.cs index d3c0914..c98ba96 100644 --- a/Gaming/Wrapper.cs +++ b/Gaming/Wrapper.cs @@ -4,7 +4,7 @@ using EightBit; using System; - public class Wrapper(bool verbose) : Device + public class Wrapper(SDL.LogPriority logging = SDL.LogPriority.Warn) : Device { public override void RaisePOWER() { @@ -22,7 +22,7 @@ { var success = SDL.Init(SDL.InitFlags.Video | SDL.InitFlags.Audio | SDL.InitFlags.Gamepad | SDL.InitFlags.Haptic); Wrapper.MaybeThrowException(success, "Unable to initialise SDL library"); - SDL.SetLogPriorities(verbose ? SDL.LogPriority.Trace : SDL.LogPriority.Warn); + SDL.SetLogPriorities(logging); SDL.LogInfo(SDL.LogCategory.Application, "SDL library initialised"); }