1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Replace backslash by forward slash in plugin's path.

This commit is contained in:
Sergey Lipskiy 2015-03-06 15:07:14 +06:00
parent ae8eef93a0
commit 7ade71eb55

View File

@ -1,3 +1,4 @@
#include <algorithm>
#include "GLideN64_Windows.h"
#include <commctrl.h>
#include "../PluginAPI.h"
@ -43,6 +44,7 @@ void PluginAPI::FindPluginPath(wchar_t * _strPath)
return;
#endif
std::wstring pluginPath(_strPath);
std::wstring::size_type pos = pluginPath.find_last_of(L"\\/");
std::replace(pluginPath.begin(), pluginPath.end(), L'\\', L'/');
std::wstring::size_type pos = pluginPath.find_last_of(L"/");
wcscpy(_strPath, pluginPath.substr(0, pos).c_str());
}