2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Update LoggingUtils and Material

This commit is contained in:
2021-11-28 18:10:00 +00:00
parent 340bfa288d
commit bb535732cd
2 changed files with 8 additions and 9 deletions

View File

@@ -28,25 +28,25 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential, Pack = 4)] [StructLayout(LayoutKind.Sequential, Pack = 4)]
struct VaListLinuxX64 struct VaListLinuxX64
{ {
uint gp_offset; uint gpOffset;
uint fp_offset; uint fpOffset;
IntPtr overflow_arg_area; IntPtr overflowArgArea;
IntPtr reg_save_area; IntPtr regSaveArea;
} }
/// <summary> /// <summary>
/// Logging workaround for formatting strings from native code /// Logging workaround for formatting strings from native code
/// </summary> /// </summary>
public static class LoggingUtils public static class Logging
{ {
static LoggingUtils() static Logging()
{ {
Raylib.SetTraceLogCallback(LogConsole); Raylib.SetTraceLogCallback(LogConsole);
} }
public static void LogConsole(TraceLogLevel msgType, IntPtr text, IntPtr args) public static void LogConsole(TraceLogLevel msgType, IntPtr text, IntPtr args)
{ {
var message = LoggingUtils.GetLogMessage(text, args); var message = GetLogMessage(text, args);
Console.WriteLine(message); Console.WriteLine(message);
} }
@@ -110,7 +110,6 @@ namespace Raylib_cs
byteLength = Native.vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1; byteLength = Native.vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1;
// Allocate buffer for result // Allocate buffer for result
// listPointer = Marshal.AllocHGlobal(Marshal.SizeOf(listStructure));
Marshal.StructureToPtr(listStructure, listPointer, false); Marshal.StructureToPtr(listStructure, listPointer, false);
IntPtr utf8Buffer = IntPtr.Zero; IntPtr utf8Buffer = IntPtr.Zero;

View File

@@ -86,6 +86,6 @@ namespace Raylib_cs
/// <summary> /// <summary>
/// Material generic parameters (if required) /// Material generic parameters (if required)
/// </summary> /// </summary>
public float *param; public fixed float param[4];
} }
} }