From 336676762060801702e45b2f5930081e87477956 Mon Sep 17 00:00:00 2001 From: Pierre Ferran Date: Sun, 27 Feb 2022 20:39:10 +0100 Subject: [PATCH] Different call to windows API --- src/config.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.cpp b/src/config.cpp index d0db1e8..b02d0fb 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -5,7 +5,9 @@ #endif #ifdef SFML_SYSTEM_WINDOWS + #pragma comment(lib, "Shlwapi.lib") #include + #include #endif #ifdef SFML_SYSTEM_LINUX @@ -45,7 +47,7 @@ namespace afv_unix { #ifdef SFML_SYSTEM_WINDOWS wchar_t path[MAX_PATH] = { 0 }; GetModuleFileNameW(NULL, path, MAX_PATH); - PathCchRemoveFileSpec(path, sizeof(path)/sizeof(wchar_t)); + PathRemoveFileSpecA(path); std::wstring ws(path); return std::string(ws.begin(), ws.end()) + std::string("/"); #endif