fix _access is os specify
parent
c609c5a354
commit
6fc72ce66e
|
@ -10,17 +10,17 @@ const std::string getAssetPath()
|
||||||
return "";
|
return "";
|
||||||
#elif defined(VK_EXAMPLE_DATA_DIR)
|
#elif defined(VK_EXAMPLE_DATA_DIR)
|
||||||
|
|
||||||
if (_access("./../data/", 0) != -1)
|
if (std::filesystem::exists("./../data/"))
|
||||||
{
|
{
|
||||||
|
|
||||||
return "./../data/";
|
return "./../data/";
|
||||||
}
|
}
|
||||||
else if (_access("./data/", 0) != -1)
|
else if (std::filesystem::exists("./data/"))
|
||||||
{
|
{
|
||||||
|
|
||||||
return "./data/";
|
return "./data/";
|
||||||
}
|
}
|
||||||
else if (_access("./../../data/", 0) != -1)
|
else if (std::filesystem::exists("./../../data/"))
|
||||||
{
|
{
|
||||||
|
|
||||||
return "../../data/";
|
return "../../data/";
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <filesystem>
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
Loading…
Reference in New Issue