Skip to content

Commit

Permalink
Fix macos builds from using ungated std::filesystem calls in cata_imgui
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Krieger committed Aug 27, 2024
1 parent 75242ae commit ce1f4aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ce1f4aa

Please sign in to comment.