From 13d970200092079b72e083d4c7afcb7857476d6f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 15 Nov 2020 00:16:00 +1000 Subject: [PATCH] HostDisplay: Log errno on file open failure --- src/core/host_display.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/host_display.cpp b/src/core/host_display.cpp index aa341a260..d5b4863b4 100644 --- a/src/core/host_display.cpp +++ b/src/core/host_display.cpp @@ -6,6 +6,7 @@ #include "stb_image.h" #include "stb_image_resize.h" #include "stb_image_write.h" +#include #include #include #include @@ -287,7 +288,7 @@ bool HostDisplay::WriteTextureToFile(const void* texture_handle, u32 x, u32 y, u auto fp = FileSystem::OpenManagedCFile(filename, "wb"); if (!fp) { - Log_ErrorPrintf("Can't open file '%s'", filename); + Log_ErrorPrintf("Can't open file '%s': errno %d", filename, errno); return false; }