Skip to content

Commit

Permalink
Merge pull request CleverRaven#75986 from akrieger/stdfsck
Browse files Browse the repository at this point in the history
Fix macos builds from using ungated std::filesystem calls in cata_imgui
  • Loading branch information
Maleclypse authored Aug 27, 2024
2 parents 83b5393 + ce1f4aa commit 871d063
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 871d063

Please sign in to comment.