fix release builds not compiling, use correct function to check if asset pack exists

This commit is contained in:
matthew 2025-07-12 19:21:59 +10:00
parent 56cadf09df
commit b89d01984c
2 changed files with 13 additions and 9 deletions

View File

@ -289,7 +289,7 @@ BeginRender(Vulkan* vk)
sType: VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO, sType: VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO,
imageView: vk.draw_image.view, imageView: vk.draw_image.view,
imageLayout: vk.draw_image.base.layout, imageLayout: vk.draw_image.base.layout,
loadOp: VK_ATTACHMENT_LOAD_OP_LOAD, loadOp: VK_ATTACHMENT_LOAD_OP_LOAD, // CLEAR instead of LOAD if wanting to clear colors, also clearColor value (or whatever)
storeOp: VK_ATTACHMENT_STORE_OP_STORE, storeOp: VK_ATTACHMENT_STORE_OP_STORE,
}; };
@ -1709,12 +1709,15 @@ Destroy(VkInstance instance)
void void
Destroy(VkDebugUtilsMessengerEXT dbg, VkInstance instance) Destroy(VkDebugUtilsMessengerEXT dbg, VkInstance instance)
{
debug
{ {
if (dbg) if (dbg)
{ {
vkDestroyDebugUtilsMessengerEXT(instance, dbg, null); vkDestroyDebugUtilsMessengerEXT(instance, dbg, null);
} }
} }
}
void void
Destroy(VkSurfaceKHR surface, VkInstance instance) Destroy(VkSurfaceKHR surface, VkInstance instance)

View File

@ -69,7 +69,7 @@ OpenAssetPack()
if (!Asset_Pack_Opened) if (!Asset_Pack_Opened)
{ {
bool success = true; bool success = true;
string file_path = isFile("build/assets.sgp") ? "build/assets.sgp" : "assets.sgp"; string file_path = exists("build/assets.sgp") ? "build/assets.sgp" : "assets.sgp";
// TODO: replace this with something that doesn't throw an exception and figure out if this is the best way to handle thing (probably isnt) // TODO: replace this with something that doesn't throw an exception and figure out if this is the best way to handle thing (probably isnt)
try try
@ -78,6 +78,7 @@ OpenAssetPack()
} }
catch (ErrnoException e) catch (ErrnoException e)
{ {
Logf("OpenAssetPack failure: Unable to open file %s", file_path); Logf("OpenAssetPack failure: Unable to open file %s", file_path);
assert(false, "Unable to open asset pack file"); assert(false, "Unable to open asset pack file");
} }