Fix delete-on-close and Vulkan forward

This commit is contained in:
AdvDebug
2026-07-06 17:29:27 +03:00
parent fc152b23a6
commit 5eff04afa0
2 changed files with 8 additions and 2 deletions
@@ -332,6 +332,7 @@ namespace Brovan.Generators
"vkDestroyInstance",
"vkEnumeratePhysicalDevices",
"vkGetPhysicalDeviceProperties",
"vkGetPhysicalDeviceQueueFamilyProperties",
"vkCreateDevice",
"vkGetDeviceQueue",
"vkCreateCommandPool",
@@ -5139,7 +5139,12 @@ namespace Brovan.Core.Emulation.OS.Windows
{
WinFile Closing = HandleManager.GetObjectByHandle<WinFile>(Handle);
if (Closing != null && Closing.DeletePending && !Closing.Device && !string.IsNullOrEmpty(Closing.Path))
ApplyDeleteOnClose(Closing);
{
List<ulong> HandlesForObject = HandleManager.GetHandlesByObjectId(Closing.ObjectId);
HandlesForObject.Remove(Handle);
if (HandlesForObject.Count == 0)
ApplyDeleteOnClose(Closing);
}
}
if (HandleManager.RemoveHandle(Handle))
@@ -5160,7 +5165,7 @@ namespace Brovan.Core.Emulation.OS.Windows
if (Target.Directory)
{
if (Directory.Exists(VirtualPath))
Directory.Delete(VirtualPath, true);
Directory.Delete(VirtualPath, false);
}
else if (File.Exists(VirtualPath))
{