Skip to content

Commit

Permalink
Fix Windows build error
Browse files Browse the repository at this point in the history
  • Loading branch information
geneotech committed Dec 6, 2023
1 parent 28b27eb commit 3bbfe98
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
Binary file modified cmake/steam_integration/bin/windows/steam_integration.dll
Binary file not shown.
Binary file modified cmake/steam_integration/bin/windows/steam_integration.lib
Binary file not shown.
2 changes: 1 addition & 1 deletion src/augs/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ std::string live_log_path;
app_type current_app_type;

std::string get_path_in_log_files(const std::string& name) {
return LOGS_DIR / (get_preffix_for(current_app_type) + name);
return (LOGS_DIR / (get_preffix_for(current_app_type) + name)).string();
}

std::optional<std::string> find_last_incorrect_exit() {
Expand Down
2 changes: 1 addition & 1 deletion src/augs/misc/lua/lua_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace augs {
};

const auto utils_path = DETAIL_DIR / "utils.lua";
const auto pfr = lua.do_file(utils_path);
const auto pfr = lua.do_file(utils_path.string());

if (!pfr.valid()) {
throw lua_state_creation_error(
Expand Down
7 changes: 5 additions & 2 deletions src/augs/window_framework/platform_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ namespace augs {
#endif
}

#if PLATFORM_WINDOWS
#include <Shlobj.h>

namespace augs {
#if PLATFORM_WINDOWS
path_type get_default_documents_dir() {
char path[MAX_PATH];
HRESULT result = SHGetFolderPathA(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, path);
Expand All @@ -162,10 +163,12 @@ namespace augs {
return path_type();
}
}
}
#else
namespace augs {
path_type get_default_documents_dir() {
/* Default to CWD */
return "";
}
#endif
}
#endif
2 changes: 1 addition & 1 deletion src/work.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ work_result work(

LOG("Initializing ImGui.");

const auto imgui_ini_path = std::string(USER_DIR) + "/" + get_preffix_for(current_app_type) + "imgui.ini";
const auto imgui_ini_path = (USER_DIR / (get_preffix_for(current_app_type) + "imgui.ini")).string();
const auto imgui_log_path = get_path_in_log_files("imgui_log.txt");

const auto imgui_raii = augs::imgui::context_raii(
Expand Down

0 comments on commit 3bbfe98

Please sign in to comment.