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"); }