Apply UTF-8 marshaling to return values and removed extra wrapping layer

This commit is contained in:
Jameson Ernst 2013-06-25 22:12:29 -07:00
parent 1741030481
commit 1c6c04f2e2

View file

@ -158,17 +158,12 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_ClearHints(); public static extern void SDL_ClearHints();
[DllImport(nativeLibName, EntryPoint = "SDL_GetHint", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetHint( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GetHint(
[In()] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))] [In()] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
string name string name
); );
public static string SDL_GetHint(string name)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetHint(name)
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern SDL_bool SDL_SetHint( public static extern SDL_bool SDL_SetHint(
@ -194,12 +189,9 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_ClearError(); public static extern void SDL_ClearError();
[DllImport(nativeLibName, EntryPoint = "SDL_GetError", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetError(); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_GetError() public static extern string SDL_GetError();
{
return Marshal.PtrToStringAnsi(INTERNAL_SDL_GetError());
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_SetError( public static extern void SDL_SetError(
@ -417,14 +409,9 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern void SDL_GetVersion(ref SDL_version ver); private static extern void SDL_GetVersion(ref SDL_version ver);
[DllImport(nativeLibName, EntryPoint = "SDL_GetRevision", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetRevision(); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_GetRevision() public static extern string SDL_GetRevision();
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetRevision()
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_GetRevisionNumber(); public static extern int SDL_GetRevisionNumber();
@ -593,14 +580,9 @@ namespace SDL2
ref SDL_DisplayMode mode ref SDL_DisplayMode mode
); );
[DllImport(nativeLibName, EntryPoint = "SDL_GetCurrentVideoDriver", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetCurrentVideoDriver(); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_GetCurrentVideoDriver() public static extern string SDL_GetCurrentVideoDriver();
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetCurrentVideoDriver()
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_GetDesktopDisplayMode( public static extern int SDL_GetDesktopDisplayMode(
@ -632,16 +614,11 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_GetNumVideoDrivers(); public static extern int SDL_GetNumVideoDrivers();
[DllImport(nativeLibName, EntryPoint = "SDL_GetVideoDriver", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetVideoDriver( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GetVideoDriver(
int index int index
); );
public static string SDL_GetVideoDriver(int index)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetVideoDriver(index)
);
}
/* window refers to an SDL_Window* */ /* window refers to an SDL_Window* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -722,16 +699,11 @@ namespace SDL2
public static extern IntPtr SDL_GetWindowSurface(IntPtr window); public static extern IntPtr SDL_GetWindowSurface(IntPtr window);
/* window refers to an SDL_Window* */ /* window refers to an SDL_Window* */
[DllImport(nativeLibName, EntryPoint = "SDL_GetWindowTitle", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetWindowTitle( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GetWindowTitle(
IntPtr window IntPtr window
); );
public static string SDL_GetWindowTitle(IntPtr window)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetWindowTitle(window)
);
}
/* texture refers to an SDL_Texture* */ /* texture refers to an SDL_Texture* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -1725,16 +1697,11 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_FreePalette(IntPtr palette); public static extern void SDL_FreePalette(IntPtr palette);
[DllImport(nativeLibName, EntryPoint = "SDL_GetPixelFormatName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetPixelFormatName( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GetPixelFormatName(
uint format uint format
); );
public static string SDL_GetPixelFormatName(uint format)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetPixelFormatName(format)
);
}
/* format refers to an SDL_PixelFormat* */ /* format refers to an SDL_PixelFormat* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -2181,14 +2148,9 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern SDL_bool SDL_HasClipboardText(); public static extern SDL_bool SDL_HasClipboardText();
[DllImport(nativeLibName, EntryPoint = "SDL_GetClipboardText", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetClipboardText(); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_GetClipboardText(string name) public static extern string SDL_GetClipboardText();
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetClipboardText()
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_SetClipboardText( public static extern int SDL_SetClipboardText(
@ -3357,15 +3319,9 @@ namespace SDL2
public static extern void SDL_GetScancodeFromKey(SDL_Keycode key); public static extern void SDL_GetScancodeFromKey(SDL_Keycode key);
/* Wrapper for SDL_GetScancodeName */ /* Wrapper for SDL_GetScancodeName */
[DllImport(nativeLibName, EntryPoint="SDL_GetScancodeName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetScancodeName(SDL_Scancode scancode); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
/* Get a human-readable name for a scancode */ public static extern string SDL_GetScancodeName(SDL_Scancode scancode);
public static string SDL_GetScancodeName(SDL_Scancode scancode)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetScancodeName(scancode)
);
}
/* Get a scancode from a human-readable name */ /* Get a scancode from a human-readable name */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -3374,15 +3330,9 @@ namespace SDL2
); );
/* Wrapper for SDL_GetKeyName */ /* Wrapper for SDL_GetKeyName */
[DllImport(nativeLibName, EntryPoint="SDL_GetKeyName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetKeyName(SDL_Keycode key); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
/* Get a human-readable name for a key */ public static extern string SDL_GetKeyName(SDL_Keycode key);
public static string SDL_GetKeyName(SDL_Keycode key)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetKeyName(key)
);
}
/* Get a key code from a human-readable name */ /* Get a key code from a human-readable name */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -3593,27 +3543,17 @@ namespace SDL2
public static extern int SDL_JoystickIndex(IntPtr joystick); public static extern int SDL_JoystickIndex(IntPtr joystick);
/* joystick refers to an SDL_Joystick* */ /* joystick refers to an SDL_Joystick* */
[DllImport(nativeLibName, EntryPoint = "SDL_JoystickName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_JoystickName( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string INTERNAL_SDL_JoystickName(
IntPtr joystick IntPtr joystick
); );
public static string SDL_JoystickName(IntPtr joystick)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_JoystickName(joystick)
);
}
[DllImport(nativeLibName, EntryPoint = "SDL_JoystickNameForIndex", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_JoystickNameForIndex( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_JoystickNameForIndex(
int device_index int device_index
); );
public static string SDL_JoystickNameForIndex(int device_index)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_JoystickNameForIndex(device_index)
);
}
/* joystick refers to an SDL_Joystick* */ /* joystick refers to an SDL_Joystick* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -3755,59 +3695,36 @@ namespace SDL2
); );
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerMappingForGUID", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, EntryPoint = "SDL_GameControllerMappingForGUID", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GameControllerMappingForGUID( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GameControllerMappingForGUID(
SDL_JoystickGUID guid SDL_JoystickGUID guid
); );
public static string SDL_GameControllerMappingForGUID(
SDL_JoystickGUID guid
) {
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GameControllerMappingForGUID(guid)
);
}
/* gamecontroller refers to an SDL_GameController* */ /* gamecontroller refers to an SDL_GameController* */
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerMapping", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GameControllerMapping( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GameControllerMapping(
IntPtr gamecontroller IntPtr gamecontroller
); );
public static string SDL_GameControllerMapping(
IntPtr gamecontroller
) {
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GameControllerMapping(gamecontroller)
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern SDL_bool SDL_IsGameController(int joystick_index); public static extern SDL_bool SDL_IsGameController(int joystick_index);
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerNameForIndex", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GameControllerNameForIndex( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string INTERNAL_SDL_GameControllerNameForIndex(
int joystick_index int joystick_index
); );
public static string SDL_GameControllerNameForIndex(int joystick_index)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GameControllerNameForIndex(joystick_index)
);
}
/* IntPtr refers to an SDL_GameController* */ /* IntPtr refers to an SDL_GameController* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr SDL_GameControllerOpen(int joystick_index); public static extern IntPtr SDL_GameControllerOpen(int joystick_index);
/* gamecontroller refers to an SDL_GameController* */ /* gamecontroller refers to an SDL_GameController* */
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GameControllerName( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GameControllerName(
IntPtr gamecontroller IntPtr gamecontroller
); );
public static string SDL_GameControllerName(IntPtr gamecontroller)
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GameControllerName(gamecontroller)
);
}
/* gamecontroller refers to an SDL_GameController* */ /* gamecontroller refers to an SDL_GameController* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -3835,17 +3752,11 @@ namespace SDL2
string pchString string pchString
); );
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerGetStringForAxis", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GameControllerGetStringForAxis( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GameControllerGetStringForAxis(
SDL_GameControllerAxis axis SDL_GameControllerAxis axis
); );
public static string SDL_GameControllerGetStringForAxis(
SDL_GameControllerAxis axis
) {
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GameControllerGetStringForAxis(axis)
);
}
/* gamecontroller refers to an SDL_GameController* */ /* gamecontroller refers to an SDL_GameController* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -3867,17 +3778,11 @@ namespace SDL2
string pchString string pchString
); );
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerGetStringForButton", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GameControllerGetStringForButton( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GameControllerGetStringForButton(
SDL_GameControllerButton button SDL_GameControllerButton button
); );
public static string SDL_GameControllerGetStringForButton(
SDL_GameControllerButton button
) {
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GameControllerGetStringForButton(button)
);
}
/* gamecontroller refers to an SDL_GameController* */ /* gamecontroller refers to an SDL_GameController* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -4094,14 +3999,9 @@ namespace SDL2
public static extern int SDL_HapticIndex(IntPtr haptic); public static extern int SDL_HapticIndex(IntPtr haptic);
/* haptic refers to an SDL_Haptic* */ /* haptic refers to an SDL_Haptic* */
[DllImport(nativeLibName, EntryPoint = "SDL_HapticName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_HapticName(int device_index); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_HapticName(int device_index) public static extern string SDL_HapticName(int device_index);
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_HapticName(device_index)
);
}
/* haptic refers to an SDL_Haptic* */ /* haptic refers to an SDL_Haptic* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -4353,19 +4253,12 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_FreeWAV(IntPtr audio_buf); public static extern void SDL_FreeWAV(IntPtr audio_buf);
[DllImport(nativeLibName, EntryPoint = "SDL_GetAudioDeviceName", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetAudioDeviceName( [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static extern string SDL_GetAudioDeviceName(
int index, int index,
int iscapture int iscapture
); );
public static string SDL_GetAudioDeviceName(
int index,
int iscapture
) {
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetAudioDeviceName(index, iscapture)
);
}
/* dev refers to an SDL_AudioDeviceID */ /* dev refers to an SDL_AudioDeviceID */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -4373,26 +4266,16 @@ namespace SDL2
uint dev uint dev
); );
[DllImport(nativeLibName, EntryPoint = "SDL_GetAudioDriver", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetAudioDriver(int index); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_GetAudioDriver(int index) public static extern string SDL_GetAudioDriver(int index);
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetAudioDriver(index)
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern SDL_AudioStatus SDL_GetAudioStatus(); public static extern SDL_AudioStatus SDL_GetAudioStatus();
[DllImport(nativeLibName, EntryPoint = "SDL_GetCurrentAudioDriver", CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_SDL_GetCurrentAudioDriver(); [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))]
public static string SDL_GetCurrentAudioDriver() public static extern string SDL_GetCurrentAudioDriver();
{
return Marshal.PtrToStringAnsi(
INTERNAL_SDL_GetCurrentAudioDriver()
);
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_GetNumAudioDevices(int iscapture); public static extern int SDL_GetNumAudioDevices(int iscapture);