Skip to content

Commit

Permalink
C4CrashHandlerWin32: Use Unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgen301 committed Aug 7, 2024
1 parent ecb6a04 commit 05bcd14
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 123 deletions.
12 changes: 12 additions & 0 deletions src/C4Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,13 @@ bool C4Config::Save()
return true;
}

#if defined(_WIN32) && defined(C4ENGINE)
namespace C4CrashHandlerWin32
{
void SetUserPath(std::string_view);
}
#endif

void C4ConfigGeneral::DeterminePaths(bool forceWorkingDirectory)
{
#ifdef _WIN32
Expand All @@ -595,6 +602,11 @@ void C4ConfigGeneral::DeterminePaths(bool forceWorkingDirectory)
// Temp path
GetTempPathA(CFG_MaxString, TempPath);
if (TempPath[0]) AppendBackslash(TempPath);

#ifdef C4ENGINE
C4CrashHandlerWin32::SetUserPath(UserPath);
#endif

#elif defined(__linux__)
#ifdef C4ENGINE
GetParentPath(Application.Location, ExePath);
Expand Down
Loading

0 comments on commit 05bcd14

Please sign in to comment.