From bb535732cd83fcf4c30ad7701ec14aac332e8467 Mon Sep 17 00:00:00 2001 From: ChrisDill Date: Sun, 28 Nov 2021 18:10:00 +0000 Subject: [PATCH] Update LoggingUtils and Material --- Raylib-cs/{LoggingUtils.cs => Logging.cs} | 15 +++++++-------- Raylib-cs/types/Material.cs | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) rename Raylib-cs/{LoggingUtils.cs => Logging.cs} (94%) diff --git a/Raylib-cs/LoggingUtils.cs b/Raylib-cs/Logging.cs similarity index 94% rename from Raylib-cs/LoggingUtils.cs rename to Raylib-cs/Logging.cs index d672079..c74d0ff 100644 --- a/Raylib-cs/LoggingUtils.cs +++ b/Raylib-cs/Logging.cs @@ -28,25 +28,25 @@ namespace Raylib_cs [StructLayout(LayoutKind.Sequential, Pack = 4)] struct VaListLinuxX64 { - uint gp_offset; - uint fp_offset; - IntPtr overflow_arg_area; - IntPtr reg_save_area; + uint gpOffset; + uint fpOffset; + IntPtr overflowArgArea; + IntPtr regSaveArea; } /// /// Logging workaround for formatting strings from native code /// - public static class LoggingUtils + public static class Logging { - static LoggingUtils() + static Logging() { Raylib.SetTraceLogCallback(LogConsole); } public static void LogConsole(TraceLogLevel msgType, IntPtr text, IntPtr args) { - var message = LoggingUtils.GetLogMessage(text, args); + var message = GetLogMessage(text, args); Console.WriteLine(message); } @@ -110,7 +110,6 @@ namespace Raylib_cs byteLength = Native.vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1; // Allocate buffer for result - // listPointer = Marshal.AllocHGlobal(Marshal.SizeOf(listStructure)); Marshal.StructureToPtr(listStructure, listPointer, false); IntPtr utf8Buffer = IntPtr.Zero; diff --git a/Raylib-cs/types/Material.cs b/Raylib-cs/types/Material.cs index 1d82983..0f72c8e 100644 --- a/Raylib-cs/types/Material.cs +++ b/Raylib-cs/types/Material.cs @@ -86,6 +86,6 @@ namespace Raylib_cs /// /// Material generic parameters (if required) /// - public float *param; + public fixed float param[4]; } }