Skip to content

Commit

Permalink
fix(windows): fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Milerius committed Mar 31, 2020
1 parent 176ca56 commit 543734d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/core/antara/gaming/core/details/windows/real.path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
#pragma once

#include <cassert>
#include <filesystem>
#include <boost/filesystem.hpp>
#include <string>
#include <windows.h> //! HMODULE, GetModuleHandleW, GetModuleFileNameW

namespace antara::gaming::core::details
{
std::filesystem::path
boost::filesystem::path
binary_real_path() noexcept
{
HMODULE hModule = GetModuleHandleW(nullptr);
assert(hModule != nullptr);
WCHAR path[MAX_PATH];
auto result = GetModuleFileNameW(hModule, path, MAX_PATH);
assert(result);
return std::filesystem::path(path);
return boost::filesystem::path(path);
}

std::filesystem::path
boost::filesystem::path
assets_real_path() noexcept
{
return binary_real_path().parent_path() / "assets";
Expand Down

0 comments on commit 543734d

Please sign in to comment.