You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden
#rb none
========================
MAJOR FEATURES + CHANGES
========================
Change 3754304 by Chris.Phillips
#ue4: Fix for crash that occurred when seeking past the end of an archive (#jira OCN-8990).
Change 3748500 by josh.jensen
Fixed the round() function hack shader to determine whether the shader needs mediump or highp
The shader fails to compile on some Android devices, because the precision keyword follows the round() definitions.
Change 3747950 by Brian.Zaugg
Exposed the virtual keyboard dismiss action to UMG.
Change 3744282 by Brian.Zaugg
Fix for failed engine check caused by GSystemResolution getting out of sync with actual device resolution / orientation.
Change 3739717 by Brian.Zaugg
Fix renderer compile errors in Mac nonunity build that started with Ocean's last integration from Main.
Change 3738008 by Chad.Garyet
changing lockfile still waiting warning to a regular log message
Change 3729582 by Brian.Zaugg
Fix for large Metal texture memory leak when opening card packs. (And any other time the size of the static texture heaps is exceeded.) Don't release a dynamic heap until it is completely drained.
Change 3722096 by josh.jensen
Prevented an unnecessary red<->blue swap in FVulkanDynamicRHI::RHIReadSurfaceData() when reading back a surface in VK_FORMAT_R16G16B16A16_SFLOAT format
Change 3718183 by josh.jensen
Fixed ES2 issue reading from a render target in float format for BGRA8888 when the glReadPixels() call fails
Change 3690830 by Brian.Zaugg
Default r.MetalHullParameterSize and r.MetalDomainParameterSize to 0. Saves 20 MB on iOS.
Change 3670184 by Chris.Phillips
Added ENGINE_API to UTexture2D::GetMipData().
Function was accessible is single executable stand-alone builds, but not in Editor for use when running PIE.
Change 3668970 by josh.jensen
Provided an implementation of round() under GLES2 when the shader compiler does not provide it
Change 3624855 by josh.jensen
Fixed issue where FOpenGLDynamicRHI::RHISetRenderTargetsAndClear() would crash when the render target did not have a color binding
This reproduced in a number of circumstances, but it was most common with tonemap postprocessing on Android for a particular title.
Change 3693739 by Brian.Zaugg
Moved the hull and domain shader parameter size change from BaseDeviceProfiles to DefaultDeviceProfiles.
Change 3655434 by James.Brinkerhoff
Adding a function to set the delay of a particle system dynamically
Change 3605036 by Brian.Zaugg
Track opened pak files. Console command "DumpOpenedFiles" print the list.
[CL 3764500 by James Brinkerhoff in Main branch]
88 lines
3.4 KiB
C#
88 lines
3.4 KiB
C#
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using Tools.DotNETCommon;
|
|
using UnrealBuildTool;
|
|
|
|
namespace AutomationTool
|
|
{
|
|
/// <summary>
|
|
/// Utility class which creates a file and obtains an exclusive lock on it. Used as a mutex between processes on different machines through a network share.
|
|
/// </summary>
|
|
static class LockFile
|
|
{
|
|
public static void TakeLock(DirectoryReference LockDirectory, TimeSpan Timeout, System.Action Callback)
|
|
{
|
|
string LockFilePath = Path.Combine(LockDirectory.FullName, ".lock");
|
|
|
|
FileStream Stream = null;
|
|
DateTime StartTime = DateTime.Now;
|
|
DateTime Deadline = StartTime.Add(Timeout);
|
|
|
|
try
|
|
{
|
|
DirectoryReference.CreateDirectory(LockDirectory);
|
|
|
|
for (int Iterations = 0; ; ++Iterations)
|
|
{
|
|
// Attempt to create the lock file. Ignore any IO exceptions. Stream will be null if this fails.
|
|
try { Stream = new FileStream(LockFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, 4096, FileOptions.DeleteOnClose); }
|
|
catch (IOException) { }
|
|
|
|
if (Stream != null)
|
|
{
|
|
// If we have a stream, we've taken the lock.
|
|
try
|
|
{
|
|
// Write the machine name to the file.
|
|
Stream.Write(Encoding.UTF8.GetBytes(Environment.MachineName));
|
|
Stream.Flush();
|
|
break;
|
|
}
|
|
catch
|
|
{
|
|
throw new AutomationException("Failed to write to the lock file '{0}'.", LockFilePath);
|
|
}
|
|
}
|
|
|
|
// We've failed to take the lock. Throw an exception if the timeout has elapsed.
|
|
// Otherwise print a log message and retry.
|
|
var CurrentTime = DateTime.Now;
|
|
if (CurrentTime >= Deadline)
|
|
{
|
|
throw new AutomationException("Couldn't create lock file '{0}' after {1} seconds.", LockFilePath, CurrentTime.Subtract(StartTime).TotalSeconds);
|
|
}
|
|
|
|
if (Iterations == 0)
|
|
{
|
|
CommandUtils.Log("Waiting for lock file '{0}' to be removed...", LockFilePath);
|
|
}
|
|
else if ((Iterations % 30) == 0)
|
|
{
|
|
CommandUtils.Log("Still waiting for lock file '{0}' after {1} seconds.", LockFilePath, CurrentTime.Subtract(StartTime).TotalSeconds);
|
|
}
|
|
|
|
// Wait for a while before retrying.
|
|
Thread.Sleep(1000);
|
|
}
|
|
|
|
// Invoke the user callback now that we own the lock.
|
|
Callback();
|
|
}
|
|
finally
|
|
{
|
|
// Always dispose the lock file stream if we took the lock.
|
|
// The file will delete on close.
|
|
if (Stream != null)
|
|
{
|
|
Stream.Dispose();
|
|
Stream = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|