Skip to content

Commit

Permalink
PSP2: fix compilation #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cpasjuste committed Jan 23, 2017
1 parent d57f237 commit c0c0a0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
16 changes: 10 additions & 6 deletions pfba/skeleton/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
//

#ifndef __PSP2__

#include <sys/stat.h>
#include <dirent.h>
#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<std::string> Utility::GetFileList(const char *path) {

#ifndef __PSP2__
std::vector<std::string> files;
DIR *dir;
struct dirent *ent;
Expand All @@ -28,8 +32,8 @@ std::vector<std::string> Utility::GetFileList(const char *path) {
}
closedir(dir);
}

return files;
}

#else
return std::vector<std::string>();
#endif
}

0 comments on commit c0c0a0c

Please sign in to comment.