Update default LogConsole callback
This commit is contained in:
parent
9a0e50d70c
commit
e2fc83717f
2 changed files with 5 additions and 5 deletions
|
|
@ -37,16 +37,17 @@ namespace Raylib_cs
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logging workaround for formatting strings from native code
|
/// Logging workaround for formatting strings from native code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class Logging
|
public static unsafe class Logging
|
||||||
{
|
{
|
||||||
static Logging()
|
static Logging()
|
||||||
{
|
{
|
||||||
Raylib.SetTraceLogCallback(LogConsole);
|
Raylib.SetTraceLogCallback(&LogConsole);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LogConsole(TraceLogLevel msgType, IntPtr text, IntPtr args)
|
[UnmanagedCallersOnly(CallConvs = new[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })]
|
||||||
|
public static unsafe void LogConsole(int msgType, sbyte* text, sbyte* args)
|
||||||
{
|
{
|
||||||
var message = GetLogMessage(text, args);
|
var message = GetLogMessage(new IntPtr(text), new IntPtr(args));
|
||||||
Console.WriteLine(message);
|
Console.WriteLine(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ namespace Raylib_cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Color Fade(Color color, float alpha) => ColorAlpha(color, alpha);
|
public static Color Fade(Color color, float alpha) => ColorAlpha(color, alpha);
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Window and Graphics Device Functions (Module: core)
|
// Window and Graphics Device Functions (Module: core)
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue