mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-10-23 08:02:16 +00:00
Use SDL3 logging level directly, rather than verbosity/debugging booleans.
This commit is contained in:
1 parent
9647eb6d6f
commit
1978896085
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -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;
|
||||
|
||||
|
||||
+2
-2
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user