mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
mantis 9159: ignore spaces in z on cast string to vector
This commit is contained in:
@@ -1099,14 +1099,18 @@ namespace OpenSim.Framework
|
||||
/// Is the platform Windows?
|
||||
/// </summary>
|
||||
/// <returns>true if so, false otherwise</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool IsWindows()
|
||||
{
|
||||
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||
/*
|
||||
PlatformID platformId = Environment.OSVersion.Platform;
|
||||
|
||||
return (platformId == PlatformID.Win32NT
|
||||
|| platformId == PlatformID.Win32S
|
||||
|| platformId == PlatformID.Win32Windows
|
||||
|| platformId == PlatformID.WinCE);
|
||||
*/
|
||||
}
|
||||
|
||||
public static bool LoadArchSpecificWindowsDll(string libraryName)
|
||||
@@ -3100,6 +3104,39 @@ namespace OpenSim.Framework
|
||||
return false;
|
||||
}
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern uint timeBeginPeriod(uint period);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void TimeBeginPeriod(uint period)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
timeBeginPeriod(period);
|
||||
}
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern uint timeEndPeriod(uint period);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void TimeEndPeriod(uint period)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
timeEndPeriod(period);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void ThreadSleep(int period)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
timeEndPeriod(1);
|
||||
Thread.Sleep(period);
|
||||
timeEndPeriod(1);
|
||||
}
|
||||
else
|
||||
Thread.Sleep(period);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to trigger an early library load on Windows systems.
|
||||
/// </summary>
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
while (++comma < str.Length)
|
||||
{
|
||||
c = Unsafe.Add(ref MemoryMarshal.GetReference(str), comma);
|
||||
if (c == ' ' || c == '>')
|
||||
if (c == '>')
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user