android: fix directory listing, keyboard show/hide and read chars
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <dirent.h>
|
||||
AAssetManager* Asset::m_am;
|
||||
#endif
|
||||
|
||||
@@ -49,7 +50,19 @@ std::vector<std::string> Asset::list_files(std::string folder, bool is_asset, co
|
||||
}
|
||||
else
|
||||
{
|
||||
DIR *dp;
|
||||
struct dirent *ep;
|
||||
dp = opendir(folder.c_str());
|
||||
|
||||
if (dp != NULL)
|
||||
{
|
||||
while ((ep = readdir(dp)))
|
||||
if (ep->d_type != DT_DIR)
|
||||
names.push_back(ep->d_name);
|
||||
closedir(dp);
|
||||
}
|
||||
else
|
||||
LOG("Couldn't open the directory: %s", folder.c_str());
|
||||
}
|
||||
#else
|
||||
std::string abs_path = folder;
|
||||
|
||||
Reference in New Issue
Block a user