From c0c0a0c13f07adce96c7d32373e73d5d7cb82ae2 Mon Sep 17 00:00:00 2001 From: cpasjuste Date: Mon, 23 Jan 2017 11:43:00 +0100 Subject: [PATCH] PSP2: fix compilation #2 --- CMakeLists.txt | 4 ++-- pfba/skeleton/utility.cpp | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb37db7..02d59a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,9 @@ set(CMAKE_SYSTEM_NAME "Generic") enable_language(ASM) # delete cmake cache folder before changing this options -option(BUILD_SDL2 "Build with SDL2 support" ON) +option(BUILD_SDL2 "Build with SDL2 support" OFF) option(BUILD_SFML "Build with SFML support" OFF) -option(BUILD_PSP2 "Build with PSP2 support" OFF) +option(BUILD_PSP2 "Build with PSP2 support" ON) option(BUILD_RPI "Build with RPI support" OFF) if (CMAKE_BUILD_TYPE STREQUAL "Debug") diff --git a/pfba/skeleton/utility.cpp b/pfba/skeleton/utility.cpp index a530b5e..f6e32d1 100644 --- a/pfba/skeleton/utility.cpp +++ b/pfba/skeleton/utility.cpp @@ -3,19 +3,23 @@ // #ifndef __PSP2__ - #include #include +#endif + #include "utility.h" bool Utility::FileExist(const char *file) { - +#ifndef __PSP2__ struct stat buf; return (stat(file, &buf) == 0); +#else + return false; +#endif } std::vector Utility::GetFileList(const char *path) { - +#ifndef __PSP2__ std::vector files; DIR *dir; struct dirent *ent; @@ -28,8 +32,8 @@ std::vector Utility::GetFileList(const char *path) { } closedir(dir); } - return files; -} - +#else + return std::vector(); #endif +} \ No newline at end of file