(a00338777) v0.9.2.1
This commit is contained in:
@@ -14,17 +14,60 @@ namespace Facepunch.Steamworks
|
||||
get
|
||||
{
|
||||
if ( _auth == null )
|
||||
_auth = new Auth{ client = this };
|
||||
_auth = new Auth(this);
|
||||
|
||||
return _auth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Steam authentication statuses
|
||||
/// </summary>
|
||||
public enum ClientAuthStatus : int
|
||||
{
|
||||
OK = 0,
|
||||
UserNotConnectedToSteam = 1,
|
||||
NoLicenseOrExpired = 2,
|
||||
VACBanned = 3,
|
||||
LoggedInElseWhere = 4,
|
||||
VACCheckTimedOut = 5,
|
||||
AuthTicketCanceled = 6,
|
||||
AuthTicketInvalidAlreadyUsed = 7,
|
||||
AuthTicketInvalid = 8,
|
||||
PublisherIssuedBan = 9,
|
||||
}
|
||||
|
||||
public enum ClientStartAuthSessionResult : int
|
||||
{
|
||||
OK = 0,
|
||||
InvalidTicket = 1,
|
||||
DuplicateRequest = 2,
|
||||
InvalidVersion = 3,
|
||||
GameMismatch = 4,
|
||||
ExpiredTicket = 5,
|
||||
ServerNotConnectedToSteam = 6,
|
||||
}
|
||||
|
||||
public class Auth
|
||||
{
|
||||
public Auth(Client c)
|
||||
{
|
||||
client = c;
|
||||
|
||||
client.RegisterCallback<SteamNative.ValidateAuthTicketResponse_t>(OnAuthTicketValidate);
|
||||
}
|
||||
|
||||
void OnAuthTicketValidate(SteamNative.ValidateAuthTicketResponse_t data)
|
||||
{
|
||||
if (OnAuthChange != null)
|
||||
OnAuthChange(data.SteamID, data.OwnerSteamID, (ClientAuthStatus)data.AuthSessionResponse);
|
||||
}
|
||||
|
||||
internal Client client;
|
||||
|
||||
public Action<ulong, ulong, ClientAuthStatus> OnAuthChange;
|
||||
|
||||
public class Ticket : IDisposable
|
||||
{
|
||||
internal Client client;
|
||||
@@ -77,6 +120,27 @@ namespace Facepunch.Steamworks
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange.
|
||||
/// </summary>
|
||||
public unsafe ClientStartAuthSessionResult StartSession(byte[] data, ulong steamid)
|
||||
{
|
||||
fixed (byte* p = data)
|
||||
{
|
||||
var result = client.native.user.BeginAuthSession((IntPtr)p, data.Length, steamid);
|
||||
|
||||
return (ClientStartAuthSessionResult)result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forget this guy. They're no longer in the game.
|
||||
/// </summary>
|
||||
public void EndSession(ulong steamid)
|
||||
{
|
||||
client.native.user.EndAuthSession(steamid);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,12 @@ namespace Facepunch.Steamworks
|
||||
if ( data.ContainsKey( k ) )
|
||||
{
|
||||
if ( data[k] == v ) { return true; }
|
||||
if ( client.native.matchmaking.SetLobbyData( lobby, k, v ) )
|
||||
bool setKey = true;
|
||||
if (lobby == client.Lobby.CurrentLobby && client.Lobby.Owner == client.SteamId)
|
||||
{
|
||||
setKey = client.native.matchmaking.SetLobbyData(lobby, k, v);
|
||||
}
|
||||
if ( setKey )
|
||||
{
|
||||
data[k] = v;
|
||||
return true;
|
||||
@@ -68,7 +73,12 @@ namespace Facepunch.Steamworks
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( client.native.matchmaking.SetLobbyData( lobby, k, v ) )
|
||||
bool setKey = true;
|
||||
if (lobby == client.Lobby.CurrentLobby && client.Lobby.Owner == client.SteamId)
|
||||
{
|
||||
setKey = client.native.matchmaking.SetLobbyData(lobby, k, v);
|
||||
}
|
||||
if ( setKey )
|
||||
{
|
||||
data.Add( k, v );
|
||||
return true;
|
||||
|
||||
@@ -169,19 +169,29 @@ namespace Facepunch.Steamworks
|
||||
/// <summary>
|
||||
/// Updates the LobbyData property to have the data for the current lobby, if any
|
||||
/// </summary>
|
||||
private bool suppressUpdateLobbyData = false;
|
||||
internal void UpdateLobbyData()
|
||||
{
|
||||
int dataCount = client.native.matchmaking.GetLobbyDataCount( CurrentLobby );
|
||||
CurrentLobbyData = new LobbyData( client, CurrentLobby );
|
||||
for ( int i = 0; i < dataCount; i++ )
|
||||
if (suppressUpdateLobbyData) { return; }
|
||||
try
|
||||
{
|
||||
if ( client.native.matchmaking.GetLobbyDataByIndex( CurrentLobby, i, out string key, out string value ) )
|
||||
suppressUpdateLobbyData = true;
|
||||
int dataCount = client.native.matchmaking.GetLobbyDataCount(CurrentLobby);
|
||||
CurrentLobbyData = new LobbyData(client, CurrentLobby);
|
||||
for (int i = 0; i < dataCount; i++)
|
||||
{
|
||||
CurrentLobbyData.SetData( key, value );
|
||||
if (client.native.matchmaking.GetLobbyDataByIndex(CurrentLobby, i, out string key, out string value))
|
||||
{
|
||||
CurrentLobbyData.SetData(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( OnLobbyDataUpdated != null ) { OnLobbyDataUpdated(); }
|
||||
if (OnLobbyDataUpdated != null) { OnLobbyDataUpdated(); }
|
||||
}
|
||||
finally
|
||||
{
|
||||
suppressUpdateLobbyData = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Facepunch.Steamworks
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool registeredLobbyDataUpdated = false;
|
||||
void OnLobbyList(LobbyMatchList_t callback, bool error)
|
||||
{
|
||||
if (error) return;
|
||||
@@ -89,6 +89,9 @@ namespace Facepunch.Steamworks
|
||||
{
|
||||
//add the lobby to the list of requests
|
||||
ulong lobby = client.native.matchmaking.GetLobbyByIndex(i);
|
||||
|
||||
if (requests.Contains(lobby)) { continue; }
|
||||
|
||||
requests.Add(lobby);
|
||||
|
||||
//cast to a LobbyList.Lobby
|
||||
@@ -103,7 +106,11 @@ namespace Facepunch.Steamworks
|
||||
{
|
||||
//else we need to get the info for the missing lobby
|
||||
client.native.matchmaking.RequestLobbyData(lobby);
|
||||
client.RegisterCallback<SteamNative.LobbyDataUpdate_t>( OnLobbyDataUpdated );
|
||||
if (!registeredLobbyDataUpdated)
|
||||
{
|
||||
client.RegisterCallback<SteamNative.LobbyDataUpdate_t>(OnLobbyDataUpdated);
|
||||
registeredLobbyDataUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -115,7 +122,7 @@ namespace Facepunch.Steamworks
|
||||
|
||||
void checkFinished()
|
||||
{
|
||||
if (Lobbies.Count == requests.Count)
|
||||
if (Lobbies.Count >= requests.Count)
|
||||
{
|
||||
Finished = true;
|
||||
return;
|
||||
@@ -128,11 +135,12 @@ namespace Facepunch.Steamworks
|
||||
if (callback.Success == 1) //1 if success, 0 if failure
|
||||
{
|
||||
//find the lobby that has been updated
|
||||
Lobby lobby = Lobbies.Find(x => x.LobbyID == callback.SteamIDLobby);
|
||||
Lobby lobby = Lobbies.Find(x => x != null && x.LobbyID == callback.SteamIDLobby);
|
||||
|
||||
//if this lobby isn't yet in the list of lobbies, we know that we should add it
|
||||
if (lobby == null)
|
||||
{
|
||||
lobby = Lobby.FromSteam(client, callback.SteamIDLobby);
|
||||
Lobbies.Add(lobby);
|
||||
checkFinished();
|
||||
}
|
||||
@@ -140,8 +148,6 @@ namespace Facepunch.Steamworks
|
||||
//otherwise lobby data in general was updated and you should listen to see what changed
|
||||
if (OnLobbiesUpdated != null) { OnLobbiesUpdated(); }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Action OnLobbiesUpdated;
|
||||
|
||||
@@ -46,16 +46,36 @@ namespace Facepunch.Steamworks
|
||||
|
||||
internal static Server FromSteam( Client client, SteamNative.gameserveritem_t item )
|
||||
{
|
||||
int serverNameLength = item.ServerName.Length;
|
||||
for (int i = 0; i < item.ServerName.Length; i++)
|
||||
{
|
||||
if (item.ServerName[i] == '\0')
|
||||
{
|
||||
serverNameLength = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int mapLength = item.Map.Length;
|
||||
for (int i = 0; i < item.Map.Length; i++)
|
||||
{
|
||||
if (item.Map[i] == '\0')
|
||||
{
|
||||
mapLength = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return new Server()
|
||||
{
|
||||
Client = client,
|
||||
Address = Utility.Int32ToIp( item.NetAdr.IP ),
|
||||
ConnectionPort = item.NetAdr.ConnectionPort,
|
||||
QueryPort = item.NetAdr.QueryPort,
|
||||
Name = Encoding.UTF8.GetString(item.ServerName),
|
||||
Name = Encoding.UTF8.GetString(item.ServerName, 0, serverNameLength),
|
||||
Ping = item.Ping,
|
||||
GameDir = item.GameDir,
|
||||
Map = Encoding.UTF8.GetString(item.Map),
|
||||
Map = Encoding.UTF8.GetString(item.Map, 0, mapLength),
|
||||
Description = item.GameDescription,
|
||||
AppId = item.AppID,
|
||||
Players = item.Players,
|
||||
|
||||
@@ -37,7 +37,10 @@ namespace Facepunch.Steamworks
|
||||
OnIncomingConnection = null;
|
||||
OnConnectionFailed = null;
|
||||
OnP2PData = null;
|
||||
ListenChannels.Clear();
|
||||
lock (ListenChannels)
|
||||
{
|
||||
ListenChannels.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,27 +59,34 @@ namespace Facepunch.Steamworks
|
||||
UpdateTimer.Reset();
|
||||
UpdateTimer.Start();
|
||||
|
||||
foreach ( var channel in ListenChannels )
|
||||
lock (ListenChannels)
|
||||
{
|
||||
while ( ReadP2PPacket( channel ) )
|
||||
for (int i = 0; i < ListenChannels.Count; i++)
|
||||
{
|
||||
// Nothing Here.
|
||||
while (ReadP2PPacket(ListenChannels[i]))
|
||||
{
|
||||
//handle listen channel being closed by OnP2PData callback
|
||||
if (i >= ListenChannels.Count) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable listening on a specific channel.
|
||||
/// If you donp't enable the channel we won't listen to it,
|
||||
/// If you don't enable the channel we won't listen to it,
|
||||
/// so you won't be able to receive messages on it.
|
||||
/// </summary>
|
||||
public void SetListenChannel( int ChannelId, bool Listen )
|
||||
{
|
||||
ListenChannels.RemoveAll( x => x == ChannelId );
|
||||
|
||||
if ( Listen )
|
||||
lock (ListenChannels)
|
||||
{
|
||||
ListenChannels.Add( ChannelId );
|
||||
ListenChannels.RemoveAll(x => x == ChannelId);
|
||||
|
||||
if (Listen)
|
||||
{
|
||||
ListenChannels.Add(ChannelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,9 +52,19 @@ namespace Facepunch.Steamworks
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Download( bool highPriority = true, Action onInstalled = null )
|
||||
public bool Download(bool highPriority = true, Action onInstalled = null)
|
||||
{
|
||||
if ( Installed ) return true;
|
||||
return Download(highPriority, false, onInstalled);
|
||||
}
|
||||
|
||||
public bool ForceDownload(bool highPriority = true, Action onInstalled = null)
|
||||
{
|
||||
return Download(highPriority, true, onInstalled);
|
||||
}
|
||||
|
||||
private bool Download( bool highPriority = true, bool ignoreAlreadyInstalled = false, Action onInstalled = null )
|
||||
{
|
||||
if ( !ignoreAlreadyInstalled && Installed ) return true;
|
||||
if ( Downloading ) return true;
|
||||
|
||||
if ( !workshop.ugc.DownloadItem( Id, highPriority ) )
|
||||
|
||||
@@ -112,6 +112,17 @@ namespace Facepunch.Steamworks
|
||||
base.Update();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the server owner's SteamID.
|
||||
/// </summary>
|
||||
public ulong SteamId
|
||||
{
|
||||
get
|
||||
{
|
||||
return native.gameServer.GetSteamID();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets whether this should be marked as a dedicated server.
|
||||
/// If not, it is assumed to be a listen server.
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Facepunch.Steamworks
|
||||
public Action<ulong, ulong, Status> OnAuthChange;
|
||||
|
||||
/// <summary>
|
||||
/// Steam authetication statuses
|
||||
/// Steam authentication statuses
|
||||
/// </summary>
|
||||
public enum Status : int
|
||||
{
|
||||
@@ -31,6 +31,17 @@ namespace Facepunch.Steamworks
|
||||
PublisherIssuedBan = 9,
|
||||
}
|
||||
|
||||
public enum StartAuthSessionResult : int
|
||||
{
|
||||
OK = 0,
|
||||
InvalidTicket = 1,
|
||||
DuplicateRequest = 2,
|
||||
InvalidVersion = 3,
|
||||
GameMismatch = 4,
|
||||
ExpiredTicket = 5,
|
||||
ServerNotConnectedToSteam = 6,
|
||||
}
|
||||
|
||||
internal ServerAuth( Server s )
|
||||
{
|
||||
server = s;
|
||||
@@ -47,16 +58,13 @@ namespace Facepunch.Steamworks
|
||||
/// <summary>
|
||||
/// Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange.
|
||||
/// </summary>
|
||||
public unsafe bool StartSession( byte[] data, ulong steamid )
|
||||
public unsafe StartAuthSessionResult StartSession( byte[] data, ulong steamid )
|
||||
{
|
||||
fixed ( byte* p = data )
|
||||
{
|
||||
var result = server.native.gameServer.BeginAuthSession( (IntPtr)p, data.Length, steamid );
|
||||
|
||||
if ( result == SteamNative.BeginAuthSessionResult.OK )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return (StartAuthSessionResult)result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -16663,669 +16663,5 @@
|
||||
<param name="exponent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NVorbis.BufferedReadStream">
|
||||
<summary>
|
||||
A thread-safe, read-only, buffering stream wrapper.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NVorbis.DataPacket">
|
||||
<summary>
|
||||
A single data packet from a logical Vorbis stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NVorbis.DataPacket.PacketFlags">
|
||||
<summary>
|
||||
Defines flags to apply to the current packet
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.IsResync">
|
||||
<summary>
|
||||
Packet is first since reader had to resync with stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.IsEndOfStream">
|
||||
<summary>
|
||||
Packet is the last in the logical stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.IsShort">
|
||||
<summary>
|
||||
Packet does not have all its data available.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.HasGranuleCount">
|
||||
<summary>
|
||||
Packet has a granule count defined.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.User1">
|
||||
<summary>
|
||||
Flag for use by inheritors.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.User2">
|
||||
<summary>
|
||||
Flag for use by inheritors.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.User3">
|
||||
<summary>
|
||||
Flag for use by inheritors.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NVorbis.DataPacket.PacketFlags.User4">
|
||||
<summary>
|
||||
Flag for use by inheritors.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.GetFlag(NVorbis.DataPacket.PacketFlags)">
|
||||
<summary>
|
||||
Gets the value of the specified flag.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.SetFlag(NVorbis.DataPacket.PacketFlags,System.Boolean)">
|
||||
<summary>
|
||||
Sets the value of the specified flag.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Creates a new instance with the specified length.
|
||||
</summary>
|
||||
<param name="length">The length of the packet.</param>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadNextByte">
|
||||
<summary>
|
||||
Reads the next byte of the packet.
|
||||
</summary>
|
||||
<returns>The next byte if available, otherwise -1.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.Done">
|
||||
<summary>
|
||||
Indicates that the packet has been read and its data is no longer needed.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.TryPeekBits(System.Int32,System.Int32@)">
|
||||
<summary>
|
||||
Attempts to read the specified number of bits from the packet, but may return fewer. Does not advance the position counter.
|
||||
</summary>
|
||||
<param name="count">The number of bits to attempt to read.</param>
|
||||
<param name="bitsRead">The number of bits actually read.</param>
|
||||
<returns>The value of the bits read.</returns>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="count"/> is not between 0 and 64.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.SkipBits(System.Int32)">
|
||||
<summary>
|
||||
Advances the position counter by the specified number of bits.
|
||||
</summary>
|
||||
<param name="count">The number of bits to advance.</param>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ResetBitReader">
|
||||
<summary>
|
||||
Resets the bit reader.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.IsResync">
|
||||
<summary>
|
||||
Gets whether the packet was found after a stream resync.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.GranulePosition">
|
||||
<summary>
|
||||
Gets the position of the last granule in the packet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.PageGranulePosition">
|
||||
<summary>
|
||||
Gets the position of the last granule in the page the packet is in.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.Length">
|
||||
<summary>
|
||||
Gets the length of the packet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.IsEndOfStream">
|
||||
<summary>
|
||||
Gets whether the packet is the last one in the logical stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.BitsRead">
|
||||
<summary>
|
||||
Gets the number of bits read from the packet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.DataPacket.GranuleCount">
|
||||
<summary>
|
||||
Gets the number of granules in the packet. If <c>null</c>, the packet has not been decoded yet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadBits(System.Int32)">
|
||||
<summary>
|
||||
Reads the specified number of bits from the packet and advances the position counter.
|
||||
</summary>
|
||||
<param name="count">The number of bits to read.</param>
|
||||
<returns>The value of the bits read.</returns>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException">The number of bits specified is not between 0 and 64.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.PeekByte">
|
||||
<summary>
|
||||
Reads the next byte from the packet. Does not advance the position counter.
|
||||
</summary>
|
||||
<returns>The byte read from the packet.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadByte">
|
||||
<summary>
|
||||
Reads the next byte from the packet and advances the position counter.
|
||||
</summary>
|
||||
<returns>The byte read from the packet.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadBytes(System.Int32)">
|
||||
<summary>
|
||||
Reads the specified number of bytes from the packet and advances the position counter.
|
||||
</summary>
|
||||
<param name="count">The number of bytes to read.</param>
|
||||
<returns>A byte array holding the data read.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.Read(System.Byte[],System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Reads the specified number of bytes from the packet into the buffer specified and advances the position counter.
|
||||
</summary>
|
||||
<param name="buffer">The buffer to read into.</param>
|
||||
<param name="index">The index into the buffer to start placing the read data.</param>
|
||||
<param name="count">The number of bytes to read.</param>
|
||||
<returns>The number of bytes read.</returns>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than 0 or <paramref name="index"/> + <paramref name="count"/> is past the end of <paramref name="buffer"/>.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadBit">
|
||||
<summary>
|
||||
Reads the next bit from the packet and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the bit read.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadInt16">
|
||||
<summary>
|
||||
Retrieves the next 16 bits from the packet as a <see cref="T:System.Int16"/> and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the next 16 bits.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadInt32">
|
||||
<summary>
|
||||
Retrieves the next 32 bits from the packet as a <see cref="T:System.Int32"/> and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the next 32 bits.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadInt64">
|
||||
<summary>
|
||||
Retrieves the next 64 bits from the packet as a <see cref="T:System.Int64"/> and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the next 64 bits.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadUInt16">
|
||||
<summary>
|
||||
Retrieves the next 16 bits from the packet as a <see cref="T:System.UInt16"/> and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the next 16 bits.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadUInt32">
|
||||
<summary>
|
||||
Retrieves the next 32 bits from the packet as a <see cref="T:System.UInt32"/> and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the next 32 bits.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.ReadUInt64">
|
||||
<summary>
|
||||
Retrieves the next 64 bits from the packet as a <see cref="T:System.UInt64"/> and advances the position counter.
|
||||
</summary>
|
||||
<returns>The value of the next 64 bits.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.DataPacket.SkipBytes(System.Int32)">
|
||||
<summary>
|
||||
Advances the position counter by the specified number of bytes.
|
||||
</summary>
|
||||
<param name="count">The number of bytes to advance.</param>
|
||||
</member>
|
||||
<member name="T:NVorbis.IContainerReader">
|
||||
<summary>
|
||||
Provides a interface for a Vorbis logical stream container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IContainerReader.StreamSerials">
|
||||
<summary>
|
||||
Gets the list of stream serials found in the container so far.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IContainerReader.CanSeek">
|
||||
<summary>
|
||||
Gets whether the container supports seeking.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IContainerReader.WasteBits">
|
||||
<summary>
|
||||
Gets the number of bits in the container that are not associated with a logical stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IContainerReader.PagesRead">
|
||||
<summary>
|
||||
Gets the number of pages that have been read in the container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:NVorbis.IContainerReader.NewStream">
|
||||
<summary>
|
||||
Event raised when a new logical stream is found in the container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.IContainerReader.Init">
|
||||
<summary>
|
||||
Initializes the container and finds the first stream.
|
||||
</summary>
|
||||
<returns><c>True</c> if a valid logical stream is found, otherwise <c>False</c>.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.IContainerReader.FindNextStream">
|
||||
<summary>
|
||||
Finds the next new stream in the container.
|
||||
</summary>
|
||||
<returns><c>True</c> if a new stream was found, otherwise <c>False</c>.</returns>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.IContainerReader.GetTotalPageCount">
|
||||
<summary>
|
||||
Retrieves the total number of pages in the container.
|
||||
</summary>
|
||||
<returns>The total number of pages.</returns>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="T:NVorbis.IPacketProvider">
|
||||
<summary>
|
||||
Provides packets on-demand for the Vorbis stream decoder.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IPacketProvider.StreamSerial">
|
||||
<summary>
|
||||
Gets the serial number associated with this stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IPacketProvider.CanSeek">
|
||||
<summary>
|
||||
Gets whether seeking is supported on this stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IPacketProvider.ContainerBits">
|
||||
<summary>
|
||||
Gets the number of bits of overhead in this stream's container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.GetTotalPageCount">
|
||||
<summary>
|
||||
Retrieves the total number of pages (or frames) this stream uses.
|
||||
</summary>
|
||||
<returns>The page count.</returns>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IPacketProvider.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.GetNextPacket">
|
||||
<summary>
|
||||
Retrieves the next packet in the stream.
|
||||
</summary>
|
||||
<returns>The next packet in the stream or <c>null</c> if no more packets.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.PeekNextPacket">
|
||||
<summary>
|
||||
Retrieves the next packet in the stream but does not advance to the following packet.
|
||||
</summary>
|
||||
<returns>The next packet in the stream or <c>null</c> if no more packets.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.GetPacket(System.Int32)">
|
||||
<summary>
|
||||
Retrieves the packet specified from the stream.
|
||||
</summary>
|
||||
<param name="packetIndex">The index of the packet to retrieve.</param>
|
||||
<returns>The specified packet.</returns>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="packetIndex"/> is less than 0 or past the end of the stream.</exception>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IPacketProvider.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.GetGranuleCount">
|
||||
<summary>
|
||||
Retrieves the total number of granules in this Vorbis stream.
|
||||
</summary>
|
||||
<returns>The number of samples</returns>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IPacketProvider.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.FindPacket(System.Int64,System.Func{NVorbis.DataPacket,NVorbis.DataPacket,System.Int32})">
|
||||
<summary>
|
||||
Finds the packet index to the granule position specified in the current stream.
|
||||
</summary>
|
||||
<param name="granulePos">The granule position to seek to.</param>
|
||||
<param name="packetGranuleCountCallback">A callback method that takes the current and previous packets and returns the number of granules in the current packet.</param>
|
||||
<returns>The index of the packet that includes the specified granule position or -1 if none found.</returns>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="granulePos"/> is less than 0 or is after the last granule.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.IPacketProvider.SeekToPacket(NVorbis.DataPacket,System.Int32)">
|
||||
<summary>
|
||||
Sets the next packet to be returned, applying a pre-roll as necessary.
|
||||
</summary>
|
||||
<param name="packet">The packet to key from.</param>
|
||||
<param name="preRoll">The number of packets to return before the indicated packet.</param>
|
||||
</member>
|
||||
<member name="E:NVorbis.IPacketProvider.ParameterChange">
|
||||
<summary>
|
||||
Occurs when the stream is about to change parameters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.IVorbisStreamStatus.ResetStats">
|
||||
<summary>
|
||||
Gets the counters for latency and bitrate calculations, as well as overall bit counts
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.EffectiveBitRate">
|
||||
<summary>
|
||||
Gets the calculated bit rate of audio stream data for the everything decoded so far
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.InstantBitRate">
|
||||
<summary>
|
||||
Gets the calculated bit rate for the last ~1 second of audio
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.PageLatency">
|
||||
<summary>
|
||||
Gets the calculated latency per page
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.PacketLatency">
|
||||
<summary>
|
||||
Gets the calculated latency per packet
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.SecondLatency">
|
||||
<summary>
|
||||
Gets the calculated latency per second of output
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.OverheadBits">
|
||||
<summary>
|
||||
Gets the number of bits read that do not contribute to the output audio
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.AudioBits">
|
||||
<summary>
|
||||
Gets the number of bits read that contribute to the output audio
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.PagesRead">
|
||||
<summary>
|
||||
Gets the number of pages read so far in the current stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.TotalPages">
|
||||
<summary>
|
||||
Gets the total number of pages in the current stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.IVorbisStreamStatus.Clipped">
|
||||
<summary>
|
||||
Gets whether the stream has been clipped since the last reset
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NVorbis.NewStreamEventArgs">
|
||||
<summary>
|
||||
Event data for when a new logical stream is found in a container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.NewStreamEventArgs.#ctor(NVorbis.IPacketProvider)">
|
||||
<summary>
|
||||
Creates a new instance of <see cref="T:NVorbis.NewStreamEventArgs"/> with the specified <see cref="T:NVorbis.IPacketProvider"/>.
|
||||
</summary>
|
||||
<param name="packetProvider">An <see cref="T:NVorbis.IPacketProvider"/> instance.</param>
|
||||
</member>
|
||||
<member name="P:NVorbis.NewStreamEventArgs.PacketProvider">
|
||||
<summary>
|
||||
Gets new the <see cref="T:NVorbis.IPacketProvider"/> instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.NewStreamEventArgs.IgnoreStream">
|
||||
<summary>
|
||||
Gets or sets whether to ignore the logical stream associated with the packet provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NVorbis.ParameterChangeEventArgs">
|
||||
<summary>
|
||||
Event data for when a logical stream has a parameter change.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.ParameterChangeEventArgs.#ctor(NVorbis.DataPacket)">
|
||||
<summary>
|
||||
Creates a new instance of <see cref="T:NVorbis.ParameterChangeEventArgs"/>.
|
||||
</summary>
|
||||
<param name="firstPacket">The first packet after the parameter change.</param>
|
||||
</member>
|
||||
<member name="P:NVorbis.ParameterChangeEventArgs.FirstPacket">
|
||||
<summary>
|
||||
Gets the first packet after the parameter change. This would typically be the parameters packet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.StreamReadBuffer.MinimalRead">
|
||||
<summary>
|
||||
Gets or Sets whether to limit reads to the smallest size possible.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.StreamReadBuffer.MaxSize">
|
||||
<summary>
|
||||
Gets or Sets the maximum size of the buffer. This is not a hard limit.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.StreamReadBuffer.BaseOffset">
|
||||
<summary>
|
||||
Gets the offset of the start of the buffered data. Reads to offsets before this are likely to require a seek.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.StreamReadBuffer.BytesFilled">
|
||||
<summary>
|
||||
Gets the number of bytes currently buffered.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.StreamReadBuffer.Length">
|
||||
<summary>
|
||||
Gets the number of bytes the buffer can hold.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.StreamReadBuffer.Read(System.Int64,System.Byte[],System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Reads the number of bytes specified into the buffer given, starting with the offset indicated.
|
||||
</summary>
|
||||
<param name="offset">The offset into the stream to start reading.</param>
|
||||
<param name="buffer">The buffer to read to.</param>
|
||||
<param name="index">The index into the buffer to start writing to.</param>
|
||||
<param name="count">The number of bytes to read.</param>
|
||||
<returns>The number of bytes read.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.StreamReadBuffer.DiscardThrough(System.Int64)">
|
||||
<summary>
|
||||
Tells the buffer that it no longer needs to maintain any bytes before the indicated offset.
|
||||
</summary>
|
||||
<param name="offset">The offset to discard through.</param>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.Channels">
|
||||
<summary>
|
||||
Gets the number of channels in the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.SampleRate">
|
||||
<summary>
|
||||
Gets the sample rate of the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.UpperBitrate">
|
||||
<summary>
|
||||
Gets the encoder's upper bitrate of the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.NominalBitrate">
|
||||
<summary>
|
||||
Gets the encoder's nominal bitrate of the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.LowerBitrate">
|
||||
<summary>
|
||||
Gets the encoder's lower bitrate of the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.Vendor">
|
||||
<summary>
|
||||
Gets the encoder's vendor string for the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.Comments">
|
||||
<summary>
|
||||
Gets the comments in the current selected Vorbis stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.IsParameterChange">
|
||||
<summary>
|
||||
Gets whether the previous short sample count was due to a parameter change in the stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.ContainerOverheadBits">
|
||||
<summary>
|
||||
Gets the number of bits read that are related to framing and transport alone
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.ClipSamples">
|
||||
<summary>
|
||||
Gets or sets whether to automatically apply clipping to samples returned by <see cref="M:NVorbis.VorbisReader.ReadSamples(System.Single[],System.Int32,System.Int32)"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.Stats">
|
||||
<summary>
|
||||
Gets stats from each decoder stream available
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.StreamIndex">
|
||||
<summary>
|
||||
Gets the currently-selected stream's index
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.VorbisReader.ReadSamples(System.Single[],System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Reads decoded samples from the current logical stream
|
||||
</summary>
|
||||
<param name="buffer">The buffer to write the samples to</param>
|
||||
<param name="offset">The offset into the buffer to write the samples to</param>
|
||||
<param name="count">The number of samples to write</param>
|
||||
<returns>The number of samples written</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.VorbisReader.ClearParameterChange">
|
||||
<summary>
|
||||
Clears the parameter change flag so further samples can be requested.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.StreamCount">
|
||||
<summary>
|
||||
Returns the number of logical streams found so far in the physical container
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.VorbisReader.FindNextStream">
|
||||
<summary>
|
||||
Searches for the next stream in a concatenated file
|
||||
</summary>
|
||||
<returns><c>True</c> if a new stream was found, otherwise <c>false</c>.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.VorbisReader.SwitchStreams(System.Int32)">
|
||||
<summary>
|
||||
Switches to an alternate logical stream.
|
||||
</summary>
|
||||
<param name="index">The logical stream index to switch to</param>
|
||||
<returns><c>True</c> if the properties of the logical stream differ from those of the one previously being decoded. Otherwise, <c>False</c>.</returns>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.DecodedTime">
|
||||
<summary>
|
||||
Gets or Sets the current timestamp of the decoder. Is the timestamp before the next sample to be decoded
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.DecodedPosition">
|
||||
<summary>
|
||||
Gets or Sets the current position of the next sample to be decoded.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.VorbisReader.TotalTime">
|
||||
<summary>
|
||||
Gets the total length of the current logical stream
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NVorbis.Ogg.ContainerReader">
|
||||
<summary>
|
||||
Provides an <see cref="T:NVorbis.IContainerReader"/> implementation for basic Ogg files.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.Ogg.ContainerReader.StreamSerials">
|
||||
<summary>
|
||||
Gets the list of stream serials found in the container so far.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:NVorbis.Ogg.ContainerReader.NewStream">
|
||||
<summary>
|
||||
Event raised when a new logical stream is found in the container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new instance with the specified file.
|
||||
</summary>
|
||||
<param name="path">The full path to the file.</param>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.#ctor(System.IO.Stream,System.Boolean)">
|
||||
<summary>
|
||||
Creates a new instance with the specified stream. Optionally sets to close the stream when disposed.
|
||||
</summary>
|
||||
<param name="stream">The stream to read.</param>
|
||||
<param name="closeOnDispose"><c>True</c> to close the stream when <see cref="M:NVorbis.Ogg.ContainerReader.Dispose"/> is called, otherwise <c>False</c>.</param>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.Init">
|
||||
<summary>
|
||||
Initializes the container and finds the first stream.
|
||||
</summary>
|
||||
<returns><c>True</c> if a valid logical stream is found, otherwise <c>False</c>.</returns>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.Dispose">
|
||||
<summary>
|
||||
Disposes this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.GetStream(System.Int32)">
|
||||
<summary>
|
||||
Gets the <see cref="T:NVorbis.IPacketProvider"/> instance for the specified stream serial.
|
||||
</summary>
|
||||
<param name="streamSerial">The stream serial to look for.</param>
|
||||
<returns>An <see cref="T:NVorbis.IPacketProvider"/> instance.</returns>
|
||||
<exception cref="T:System.ArgumentOutOfRangeException">The specified stream serial was not found.</exception>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.FindNextStream">
|
||||
<summary>
|
||||
Finds the next new stream in the container.
|
||||
</summary>
|
||||
<returns><c>True</c> if a new stream was found, otherwise <c>False</c>.</returns>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.Ogg.ContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="P:NVorbis.Ogg.ContainerReader.PagesRead">
|
||||
<summary>
|
||||
Gets the number of pages that have been read in the container.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NVorbis.Ogg.ContainerReader.GetTotalPageCount">
|
||||
<summary>
|
||||
Retrieves the total number of pages in the container.
|
||||
</summary>
|
||||
<returns>The total number of pages.</returns>
|
||||
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.Ogg.ContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||
</member>
|
||||
<member name="P:NVorbis.Ogg.ContainerReader.CanSeek">
|
||||
<summary>
|
||||
Gets whether the container supports seeking.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NVorbis.Ogg.ContainerReader.WasteBits">
|
||||
<summary>
|
||||
Gets the number of bits in the container that are not associated with a logical stream.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -161,7 +161,7 @@ namespace Microsoft.Xna.Framework.Input
|
||||
return Keys.None;
|
||||
}
|
||||
|
||||
public static char ApplyModifiers(char chr, Sdl.Keyboard.Keymod mods)
|
||||
public static int ApplyModifiers(int chr, Sdl.Keyboard.Keymod mods)
|
||||
{
|
||||
//TODO: this is not by any means comprehensive
|
||||
if ((mods & Sdl.Keyboard.Keymod.Ctrl) == Sdl.Keyboard.Keymod.None) return chr;
|
||||
@@ -169,22 +169,22 @@ namespace Microsoft.Xna.Framework.Input
|
||||
{
|
||||
case 'a':
|
||||
case 'A':
|
||||
return (char)0x1;
|
||||
return 0x1;
|
||||
case 'r':
|
||||
case 'R':
|
||||
return (char)0x12;
|
||||
return 0x12;
|
||||
case 'z':
|
||||
case 'Z':
|
||||
return (char)0x1A;
|
||||
return 0x1A;
|
||||
case 'x':
|
||||
case 'X':
|
||||
return (char)0x18;
|
||||
return 0x18;
|
||||
case 'c':
|
||||
case 'C':
|
||||
return (char)0x3;
|
||||
return 0x3;
|
||||
case 'v':
|
||||
case 'V':
|
||||
return (char)0x16;
|
||||
return 0x16;
|
||||
}
|
||||
return chr;
|
||||
}
|
||||
|
||||
+2
-102
@@ -31,9 +31,9 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>none</DebugType>
|
||||
<OutputPath>bin\Linux\AnyCPU\Release</OutputPath>
|
||||
<OutputPath>..\..\DesktopGL\</OutputPath>
|
||||
<IntermediateOutputPath>obj\Linux\AnyCPU\Release</IntermediateOutputPath>
|
||||
<DocumentationFile>bin\Linux\AnyCPU\Release\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DocumentationFile>..\..\DesktopGL\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DefineConstants>OPENGL;OPENAL;XNADESIGNPROVIDED;TRACE;LINUX;DESKTOPGL;SUPPORTS_EFX</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -537,106 +537,6 @@
|
||||
<Compile Include="Design\Vector4TypeConverter.cs">
|
||||
<Services>_XNADesignProvided</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\BufferedReadStream.cs">
|
||||
<Link>Utilities\NVorbis\BufferedReadStream.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\DataPacket.cs">
|
||||
<Link>Utilities\NVorbis\DataPacket.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Huffman.cs">
|
||||
<Link>Utilities\NVorbis\Huffman.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\IContainerReader.cs">
|
||||
<Link>Utilities\NVorbis\IContainerReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\IPacketProvider.cs">
|
||||
<Link>Utilities\NVorbis\IPacketProvider.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\IVorbisStreamStatus.cs">
|
||||
<Link>Utilities\NVorbis\IVorbisStreamStatus.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Mdct.cs">
|
||||
<Link>Utilities\NVorbis\Mdct.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\NewStreamEventArgs.cs">
|
||||
<Link>Utilities\NVorbis\NewStreamEventArgs.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\ParameterChangeEventArgs.cs">
|
||||
<Link>Utilities\NVorbis\ParameterChangeEventArgs.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\RingBuffer.cs">
|
||||
<Link>Utilities\NVorbis\RingBuffer.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\StreamReadBuffer.cs">
|
||||
<Link>Utilities\NVorbis\StreamReadBuffer.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Utils.cs">
|
||||
<Link>Utilities\NVorbis\Utils.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisCodebook.cs">
|
||||
<Link>Utilities\NVorbis\VorbisCodebook.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisFloor.cs">
|
||||
<Link>Utilities\NVorbis\VorbisFloor.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisMapping.cs">
|
||||
<Link>Utilities\NVorbis\VorbisMapping.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisMode.cs">
|
||||
<Link>Utilities\NVorbis\VorbisMode.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisReader.cs">
|
||||
<Link>Utilities\NVorbis\VorbisReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisResidue.cs">
|
||||
<Link>Utilities\NVorbis\VorbisResidue.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisStreamDecoder.cs">
|
||||
<Link>Utilities\NVorbis\VorbisStreamDecoder.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisTime.cs">
|
||||
<Link>Utilities\NVorbis\VorbisTime.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggContainerReader.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggContainerReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggCrc.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggCrc.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggPacket.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggPacket.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggPacketReader.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggPacketReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggPageFlags.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggPageFlags.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
|
||||
+2
-2
@@ -20,9 +20,9 @@
|
||||
<Optimize>false</Optimize>
|
||||
<DebugType>full</DebugType>
|
||||
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
|
||||
<OutputPath>bin\Windows\AnyCPU\Debug</OutputPath>
|
||||
<OutputPath>..\..\Windows\</OutputPath>
|
||||
<IntermediateOutputPath>obj\Windows\AnyCPU\Debug</IntermediateOutputPath>
|
||||
<DocumentationFile>bin\Windows\AnyCPU\Debug\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DocumentationFile>..\..\Windows\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DefineConstants>DEBUG;XNADESIGNPROVIDED;TRACE;WINDOWS;DIRECTX;WINDOWS_MEDIA_SESSION</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
||||
@@ -132,9 +132,23 @@ namespace Microsoft.Xna.Framework
|
||||
|
||||
if (!_keys.Contains(key))
|
||||
_keys.Add(key);
|
||||
char character = KeyboardUtil.ApplyModifiers((char)ev.Key.Keysym.Sym, ev.Key.Keysym.Mod);
|
||||
if (char.IsControl(character))
|
||||
|
||||
//TODO: rethink all of this
|
||||
char character = (char)KeyboardUtil.ApplyModifiers(ev.Key.Keysym.Sym, ev.Key.Keysym.Mod);
|
||||
|
||||
if ((int)((char)ev.Key.Keysym.Sym) != ev.Key.Keysym.Sym)
|
||||
{
|
||||
character = '\0';
|
||||
}
|
||||
|
||||
if (char.IsControl(character) ||
|
||||
key == Keys.Left ||
|
||||
key == Keys.Right ||
|
||||
key == Keys.Up ||
|
||||
key == Keys.Down)
|
||||
{
|
||||
_view.CallTextInput(character, key);
|
||||
}
|
||||
}
|
||||
else if (ev.Type == Sdl.EventType.KeyUp)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user