(0e354918b) Fixed Unicode on the server list
This commit is contained in:
committed by
Joonas Rikkonen
parent
4a8609a3d2
commit
682b57a1c3
@@ -52,7 +52,7 @@ namespace Facepunch.Steamworks
|
||||
Address = Utility.Int32ToIp( item.NetAdr.IP ),
|
||||
ConnectionPort = item.NetAdr.ConnectionPort,
|
||||
QueryPort = item.NetAdr.QueryPort,
|
||||
Name = item.ServerName,
|
||||
Name = Encoding.UTF8.GetString(item.ServerName),
|
||||
Ping = item.Ping,
|
||||
GameDir = item.GameDir,
|
||||
Map = item.Map,
|
||||
|
||||
@@ -191,13 +191,13 @@ namespace SteamNative
|
||||
bool /*bool*/ ISteamGameServer_WasRestartRequested();
|
||||
void /*void*/ ISteamGameServer_SetMaxPlayerCount( int /*int*/ cPlayersMax );
|
||||
void /*void*/ ISteamGameServer_SetBotPlayerCount( int /*int*/ cBotplayers );
|
||||
void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName );
|
||||
void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName );
|
||||
void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName );
|
||||
void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName );
|
||||
void /*void*/ ISteamGameServer_SetPasswordProtected( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
|
||||
void /*void*/ ISteamGameServer_SetSpectatorPort( ushort /*uint16*/ unSpectatorPort );
|
||||
void /*void*/ ISteamGameServer_SetSpectatorServerName( string /*const char **/ pszSpectatorServerName );
|
||||
void /*void*/ ISteamGameServer_ClearAllKeyValues();
|
||||
void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue );
|
||||
void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
|
||||
void /*void*/ ISteamGameServer_SetGameTags( string /*const char **/ pchGameTags );
|
||||
void /*void*/ ISteamGameServer_SetGameData( string /*const char **/ pchGameData );
|
||||
void /*void*/ ISteamGameServer_SetRegion( string /*const char **/ pszRegion );
|
||||
|
||||
@@ -3951,13 +3951,13 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -3987,7 +3987,7 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -4992,13 +4992,13 @@ namespace SteamNative
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
|
||||
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
|
||||
|
||||
@@ -3951,13 +3951,13 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -3987,7 +3987,7 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -4992,13 +4992,13 @@ namespace SteamNative
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
|
||||
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
|
||||
|
||||
@@ -3951,13 +3951,13 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -3987,7 +3987,7 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -4992,13 +4992,13 @@ namespace SteamNative
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
|
||||
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
|
||||
|
||||
@@ -3917,13 +3917,13 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -3953,7 +3953,7 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -4958,13 +4958,13 @@ namespace SteamNative
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
|
||||
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
|
||||
|
||||
@@ -3917,13 +3917,13 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
|
||||
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -3953,7 +3953,7 @@ namespace SteamNative
|
||||
|
||||
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
|
||||
}
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
|
||||
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
|
||||
{
|
||||
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
|
||||
|
||||
@@ -4958,13 +4958,13 @@ namespace SteamNative
|
||||
[DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
|
||||
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SteamNative
|
||||
{
|
||||
@@ -256,13 +257,21 @@ namespace SteamNative
|
||||
// void
|
||||
public void SetKeyValue( string pKey /*const char **/, string pValue /*const char **/ )
|
||||
{
|
||||
platform.ISteamGameServer_SetKeyValue( pKey, pValue );
|
||||
byte[] bytesKey = Encoding.UTF8.GetBytes(pKey);
|
||||
GCHandle handleKey = GCHandle.Alloc(bytesKey, GCHandleType.Pinned);
|
||||
byte[] bytesValue = Encoding.UTF8.GetBytes(pValue);
|
||||
GCHandle handleValue = GCHandle.Alloc(bytesKey, GCHandleType.Pinned);
|
||||
platform.ISteamGameServer_SetKeyValue( handleKey.AddrOfPinnedObject(), handleValue.AddrOfPinnedObject() );
|
||||
handleKey.Free(); handleValue.Free();
|
||||
}
|
||||
|
||||
// void
|
||||
public void SetMapName( string pszMapName /*const char **/ )
|
||||
{
|
||||
platform.ISteamGameServer_SetMapName( pszMapName );
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(pszMapName);
|
||||
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
|
||||
platform.ISteamGameServer_SetMapName( handle.AddrOfPinnedObject() );
|
||||
handle.Free();
|
||||
}
|
||||
|
||||
// void
|
||||
@@ -298,7 +307,10 @@ namespace SteamNative
|
||||
// void
|
||||
public void SetServerName( string pszServerName /*const char **/ )
|
||||
{
|
||||
platform.ISteamGameServer_SetServerName( pszServerName );
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(pszServerName);
|
||||
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
|
||||
platform.ISteamGameServer_SetServerName( handle.AddrOfPinnedObject() );
|
||||
handle.Free();
|
||||
}
|
||||
|
||||
// void
|
||||
|
||||
@@ -5672,8 +5672,8 @@ namespace SteamNative
|
||||
internal bool Secure; // m_bSecure _Bool
|
||||
internal uint TimeLastPlayed; // m_ulTimeLastPlayed uint32
|
||||
internal int ServerVersion; // m_nServerVersion int
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
||||
internal string ServerName; // m_szServerName char [64]
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
|
||||
internal byte[] ServerName; // m_szServerName char [64]
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
|
||||
internal string GameTags; // m_szGameTags char [128]
|
||||
internal ulong SteamID; // m_steamID class CSteamID
|
||||
@@ -5721,8 +5721,8 @@ namespace SteamNative
|
||||
internal bool Secure; // m_bSecure _Bool
|
||||
internal uint TimeLastPlayed; // m_ulTimeLastPlayed uint32
|
||||
internal int ServerVersion; // m_nServerVersion int
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
||||
internal string ServerName; // m_szServerName char [64]
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
|
||||
internal byte[] ServerName; // m_szServerName char [64]
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
|
||||
internal string GameTags; // m_szGameTags char [128]
|
||||
internal ulong SteamID; // m_steamID class CSteamID
|
||||
@@ -5749,7 +5749,7 @@ namespace SteamNative
|
||||
Secure = d.Secure,
|
||||
TimeLastPlayed = d.TimeLastPlayed,
|
||||
ServerVersion = d.ServerVersion,
|
||||
ServerName = d.ServerName,
|
||||
ServerName = (byte[])d.ServerName.Clone(),
|
||||
GameTags = d.GameTags,
|
||||
SteamID = d.SteamID,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user