From 85dd4bbb6dbee185448c0addf69104d5d5aa116a Mon Sep 17 00:00:00 2001 From: David Gow Date: Wed, 23 Oct 2013 10:16:27 +0800 Subject: [PATCH] Extend filesystem docs, remove LeaveAllocated --- src/SDL2.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/SDL2.cs b/src/SDL2.cs index b770500..af69df2 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -5326,9 +5326,14 @@ namespace SDL2 /// /// string of base dir in UTF-8 encoding /// The underlying C string is owned by the application, - /// and can be NULL on some platforms. + /// and can be NULL on some platforms. + /// + /// This function is not necessarily fast, so you should only + /// call it once and save the string if you need it. + /// + /// This function is only available in SDL 2.0.1 and later. [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler), MarshalCookie = LPUtf8StrMarshaler.LeaveAllocated)] + [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))] public static extern string SDL_GetBasePath(); /// @@ -5347,9 +5352,14 @@ namespace SDL2 /// UTF-8 string of user dir in platform-dependent notation. NULL /// if there's a problem (creating directory failed, etc). /// The underlying C string is owned by the application, - /// and can be NULL on some platforms. .NET provides some similar functions. + /// and can be NULL on some platforms. .NET provides some similar functions. + /// + /// This function is not necessarily fast, so you should only + /// call it once and save the string if you need it. + /// + /// This function is only available in SDL 2.0.1 and later. [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler), MarshalCookie = LPUtf8StrMarshaler.LeaveAllocated)] + [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))] public static extern string SDL_GetPrefPath( [In()] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))] string org,