Update TraceLogCallback and INTERNAL_GetGamepadName
- Change TraceLogCallback calling convention to Cdecl. - Change INTERNAL_GetGamePadName to private.
This commit is contained in:
parent
f17aa05cef
commit
8fa8d74156
1 changed files with 2 additions and 1 deletions
|
|
@ -840,6 +840,7 @@ namespace Raylib_cs
|
||||||
public const int MAX_TOUCH_POINTS = 10;
|
public const int MAX_TOUCH_POINTS = 10;
|
||||||
|
|
||||||
// Callback delegate used in SetTraceLogCallback to allow for custom logging
|
// Callback delegate used in SetTraceLogCallback to allow for custom logging
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void TraceLogCallback(TraceLogType logType, string text, IntPtr args);
|
public delegate void TraceLogCallback(TraceLogType logType, string text, IntPtr args);
|
||||||
|
|
||||||
// Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
// Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
|
|
@ -1289,7 +1290,7 @@ namespace Raylib_cs
|
||||||
|
|
||||||
// Return gamepad internal name id
|
// Return gamepad internal name id
|
||||||
[DllImport(nativeLibName, EntryPoint = "GetGamepadName", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, EntryPoint = "GetGamepadName", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern IntPtr INTERNAL_GetGamepadName(GamepadNumber gamepad);
|
private static extern IntPtr INTERNAL_GetGamepadName(GamepadNumber gamepad);
|
||||||
public static string GetGamepadName(GamepadNumber gamepad)
|
public static string GetGamepadName(GamepadNumber gamepad)
|
||||||
{
|
{
|
||||||
return Marshal.PtrToStringAnsi(INTERNAL_GetGamepadName(gamepad));
|
return Marshal.PtrToStringAnsi(INTERNAL_GetGamepadName(gamepad));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue