~zanneth/BishiLauncher

49d70454db15c99d8ed27d1ab9c6a159aff0f0bb — Charles Magahern 4 years ago 5b1ac18 master
Fix bug where the launcher doesn't start on Windows XP
1 files changed, 3 insertions(+), 8 deletions(-)

M src/util.cpp
M src/util.cpp => src/util.cpp +3 -8
@@ 14,16 14,12 @@ FilePath::FilePath(const std::wstring &path)
      filename(MAX_PATH, L'\0'),
      extension(MAX_PATH, L'\0')
{
    _wsplitpath_s(
    _wsplitpath(
        path.c_str(),
        drive.data(),
        drive.length() * sizeof(wchar_t),
        directory.data(),
        directory.length() * sizeof(wchar_t),
        filename.data(),
        filename.length() * sizeof(wchar_t),
        extension.data(),
        extension.length() * sizeof(wchar_t)
        extension.data()
    );

    drive.resize(wcslen(drive.c_str()));


@@ 35,9 31,8 @@ FilePath::FilePath(const std::wstring &path)
std::wstring FilePath::path() const
{
    std::wstring path(MAX_PATH, L'\0');
    _wmakepath_s(
    _wmakepath(
        path.data(),
        path.length() * sizeof(wchar_t),
        drive.c_str(),
        directory.c_str(),
        filename.c_str(),