From ce1f4aa415f7a6ba3c96466db6a0e0aa90a9e5a9 Mon Sep 17 00:00:00 2001 From: Andrew Krieger Date: Mon, 26 Aug 2024 19:36:43 -0700 Subject: [PATCH] Fix macos builds from using ungated std::filesystem calls in cata_imgui --- src/cata_imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cata_imgui.cpp b/src/cata_imgui.cpp index 82d73e1f40c45..8289d8636ded0 100644 --- a/src/cata_imgui.cpp +++ b/src/cata_imgui.cpp @@ -9,6 +9,7 @@ #undef IMGUI_DEFINE_MATH_OPERATORS #include "color.h" +#include "filesystem.h" #include "input.h" #include "output.h" #include "ui_manager.h" @@ -271,8 +272,7 @@ void cataimgui::client::load_fonts( const Font_Ptr &cata_font, } auto it = std::find_if( io_typefaces.begin(), io_typefaces.end(), []( const std::string & io_typeface ) { - std::filesystem::path path( io_typeface ); - return std::filesystem::exists( path ); + return file_exist( io_typeface ); } ); std::string existing_typeface = *it; io.FontDefault = io.Fonts->AddFontFromFileTTF( existing_typeface.c_str(), fontheight, nullptr,