Fix the Android build

This commit is contained in:
Jesse Talavera-Greenberg 2023-08-07 20:37:10 -04:00
parent 3b3b9f16fc
commit f4df62aee6
2 changed files with 10 additions and 1 deletions

View File

@ -61,6 +61,8 @@ target_include_directories(libretro SYSTEM PUBLIC
"${glm_SOURCE_DIR}"
)
target_include_directories(libretro PRIVATE "${CMAKE_SOURCE_DIR}/src/libretro")
embed_binaries(libretro-assets
ASSET
NAME "melondsds_vertex_shader"

View File

@ -21,6 +21,7 @@
#include <utility>
#include <unordered_map>
#include <unistd.h>
#include <vector>
#include <file/file_path.h>
#include <Platform.h>
@ -73,7 +74,13 @@ bool Platform::FileExists(const std::string& name)
bool Platform::LocalFileExists(const std::string& name)
{
return path_is_valid(name.c_str());
if (path_is_absolute(name.c_str())) {
return path_is_valid(name.c_str());
}
std::string directory = retro::get_system_directory().value_or("");
std::string fullpath = directory + PLATFORM_DIR_SEPERATOR + name;
return path_is_valid(fullpath.c_str());
}
/// Close a file opened with \c OpenFile.