Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
rage:device: fix CitizenMount path appending
  • Loading branch information
blattersturm committed Aug 12, 2017
1 parent a8238e5 commit 96b1025
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/components/rage-device-five/src/CitizenMount.cpp
Expand Up @@ -16,6 +16,8 @@

#include <Error.h>

using namespace std::string_literals;

static int(__cdecl* origSetFunc)(void* extraContentMgr, void* a2, const char* deviceName);
int someFunc(void* a1, void* a2, const char* a3)
{
Expand Down Expand Up @@ -118,7 +120,7 @@ static InitFunction initFunction([] ()

{
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> converter;
std::string narrowPath = converter.to_bytes(MakeRelativeCitPath(L"citizen\\common" + (CfxIsSinglePlayer()) ? "-sp" : ""));
std::string narrowPath = converter.to_bytes(MakeRelativeCitPath(L"citizen\\common"s + (CfxIsSinglePlayer() ? L"-sp" : L"")));

rage::fiDeviceRelative* relativeDevice = new rage::fiDeviceRelative();
relativeDevice->SetPath(narrowPath.c_str(), nullptr, true);
Expand All @@ -131,7 +133,7 @@ static InitFunction initFunction([] ()

{
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> converter;
std::string narrowPath = converter.to_bytes(MakeRelativeCitPath(L"citizen\\platform" + (CfxIsSinglePlayer()) ? "-sp" : ""));
std::string narrowPath = converter.to_bytes(MakeRelativeCitPath(L"citizen\\platform"s + (CfxIsSinglePlayer() ? L"-sp" : L"")));

rage::fiDeviceRelative* relativeDevice = new rage::fiDeviceRelative();
relativeDevice->SetPath(narrowPath.c_str(), nullptr, true);
Expand Down

0 comments on commit 96b1025

Please sign in to comment.