mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 13:36:24 +02:00
Buildfixes
This commit is contained in:
1 parent
770f7f60e4
commit
d8583cd0d6
6 files changed
+12
-17
No files matched your search
@@ -64,7 +64,7 @@ uint8_t *ZipAssetReader::ReadAsset(const char *path, size_t *size) {
|
||||
return ReadFromZip(zip_file_, temp_path, size);
|
||||
}
|
||||
|
||||
bool ZipAssetReader::GetFileListing(const char *orig_path, std::vector<FileInfo> *listing, const char *filter = 0) {
|
||||
bool ZipAssetReader::GetFileListing(const char *orig_path, std::vector<File::FileInfo> *listing, const char *filter = 0) {
|
||||
char path[1024];
|
||||
strcpy(path, in_zip_path_);
|
||||
strcat(path, orig_path);
|
||||
@@ -111,7 +111,7 @@ bool ZipAssetReader::GetFileListing(const char *orig_path, std::vector<FileInfo>
|
||||
}
|
||||
|
||||
for (auto diter = directories.begin(); diter != directories.end(); ++diter) {
|
||||
FileInfo info;
|
||||
File::FileInfo info;
|
||||
info.name = *diter;
|
||||
info.fullName = std::string(path);
|
||||
if (info.fullName[info.fullName.size() - 1] == '/')
|
||||
@@ -127,7 +127,7 @@ bool ZipAssetReader::GetFileListing(const char *orig_path, std::vector<FileInfo>
|
||||
}
|
||||
|
||||
for (auto fiter = files.begin(); fiter != files.end(); ++fiter) {
|
||||
FileInfo info;
|
||||
File::FileInfo info;
|
||||
info.name = *fiter;
|
||||
info.fullName = std::string(path);
|
||||
if (info.fullName[info.fullName.size() - 1] == '/')
|
||||
@@ -137,7 +137,7 @@ bool ZipAssetReader::GetFileListing(const char *orig_path, std::vector<FileInfo>
|
||||
info.exists = true;
|
||||
info.isWritable = false;
|
||||
info.isDirectory = false;
|
||||
std::string ext = getFileExtension(info.fullName);
|
||||
std::string ext = File::GetFileExtension(info.fullName);
|
||||
if (filter) {
|
||||
if (filters.find(ext) == filters.end())
|
||||
continue;
|
||||
@@ -149,7 +149,7 @@ bool ZipAssetReader::GetFileListing(const char *orig_path, std::vector<FileInfo>
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZipAssetReader::GetFileInfo(const char *path, FileInfo *info) {
|
||||
bool ZipAssetReader::GetFileInfo(const char *path, File::FileInfo *info) {
|
||||
struct zip_stat zstat;
|
||||
char temp_path[1024];
|
||||
strcpy(temp_path, in_zip_path_);
|
||||
|
||||
@@ -30,8 +30,8 @@ public:
|
||||
~ZipAssetReader();
|
||||
// use delete[]
|
||||
virtual uint8_t *ReadAsset(const char *path, size_t *size);
|
||||
virtual bool GetFileListing(const char *path, std::vector<FileInfo> *listing, const char *filter);
|
||||
virtual bool GetFileInfo(const char *path, FileInfo *info);
|
||||
virtual bool GetFileListing(const char *path, std::vector<File::FileInfo> *listing, const char *filter);
|
||||
virtual bool GetFileInfo(const char *path, File::FileInfo *info);
|
||||
virtual std::string toString() const {
|
||||
return in_zip_path_;
|
||||
}
|
||||
|
||||
+1
-1
@@ -552,7 +552,7 @@ namespace Reporting
|
||||
if (!File::Exists(g_Config.flash0Directory + "/font/jpn0.pgf"))
|
||||
return false;
|
||||
#else
|
||||
FileInfo fo;
|
||||
File::FileInfo fo;
|
||||
if (!VFSGetFileInfo("flash0/font/jpn0.pgf", &fo))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -1293,7 +1293,6 @@ void GameSettingsScreen::sendMessage(const char *message, const char *value) {
|
||||
}
|
||||
}
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
void GameSettingsScreen::CallbackMemstickFolder(bool yes) {
|
||||
auto sy = GetI18NCategory("System");
|
||||
|
||||
@@ -1305,20 +1304,19 @@ void GameSettingsScreen::CallbackMemstickFolder(bool yes) {
|
||||
if (!File::Exists(pendingMemstickFolder_)) {
|
||||
File::CreateFullPath(pendingMemstickFolder_);
|
||||
}
|
||||
if (!writeDataToFile(true, "1", 1, testWriteFile.c_str())) {
|
||||
if (!File::writeDataToFile(true, "1", 1, testWriteFile.c_str())) {
|
||||
settingInfo_->Show(sy->T("ChangingMemstickPathInvalid", "That path couldn't be used to save Memory Stick files."), nullptr);
|
||||
return;
|
||||
}
|
||||
File::Delete(testWriteFile);
|
||||
|
||||
writeDataToFile(true, pendingMemstickFolder_.c_str(), pendingMemstickFolder_.size(), memstickDirFile.c_str());
|
||||
File::writeDataToFile(true, pendingMemstickFolder_.c_str(), pendingMemstickFolder_.size(), memstickDirFile.c_str());
|
||||
// Save so the settings, at least, are transferred.
|
||||
g_Config.memStickDirectory = pendingMemstickFolder_ + "/";
|
||||
g_Config.Save("MemstickPathChanged");
|
||||
screenManager()->RecreateAllViews();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GameSettingsScreen::TriggerRestart(const char *why) {
|
||||
// Extra save here to make sure the choice really gets saved even if there are shutdown bugs in
|
||||
|
||||
@@ -43,9 +43,7 @@ protected:
|
||||
void CallbackRenderingBackend(bool yes);
|
||||
void CallbackRenderingDevice(bool yes);
|
||||
void CallbackInflightFrames(bool yes);
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
void CallbackMemstickFolder(bool yes);
|
||||
#endif
|
||||
bool UseVerticalLayout() const;
|
||||
|
||||
private:
|
||||
@@ -137,9 +135,8 @@ private:
|
||||
//edit the game-specific settings and restore the global settings after exiting
|
||||
bool editThenRestore_;
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
// Android-only
|
||||
std::string pendingMemstickFolder_;
|
||||
#endif
|
||||
};
|
||||
|
||||
class SettingInfoMessage : public UI::LinearLayout {
|
||||
|
||||
+1
-1
@@ -502,7 +502,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
||||
std::string memstickDirFile = g_Config.internalDataDirectory + "/memstick_dir.txt";
|
||||
if (File::Exists(memstickDirFile)) {
|
||||
std::string memstickDir;
|
||||
readFileToString(true, memstickDirFile.c_str(), memstickDir);
|
||||
File::readFileToString(true, memstickDirFile.c_str(), memstickDir);
|
||||
if (!memstickDir.empty() && File::Exists(memstickDir)) {
|
||||
g_Config.memStickDirectory = memstickDir + "/";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user