Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Different call to windows API
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr3 committed Feb 27, 2022
1 parent 1a8bad1 commit 3366767
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#endif

#ifdef SFML_SYSTEM_WINDOWS
#pragma comment(lib, "Shlwapi.lib")
#include <windows.h>
#include <Shlwapi.h>
#endif

#ifdef SFML_SYSTEM_LINUX
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3366767

Please sign in to comment.