Skip to content

Commit

Permalink
Attempt to load VFS in headless on Android.
Browse files Browse the repository at this point in the history
Otherwise we don't get fonts, and savestates fail to load.
  • Loading branch information
unknownbrackets committed Mar 25, 2014
1 parent 36c3a0d commit 4c35c1b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions headless/Headless.cpp
Expand Up @@ -6,6 +6,7 @@
#include <cstdlib>
#include <limits>

#include "file/zip_read.h"
#include "Common/FileUtil.h"
#include "Core/Config.h"
#include "Core/Core.h"
Expand Down Expand Up @@ -375,6 +376,16 @@ int main(int argc, const char* argv[])
if (screenshotFilename != 0)
headlessHost->SetComparisonScreenshot(screenshotFilename);

#ifdef ANDROID
// For some reason the debugger installs it with this name?
if (File::Exists("/data/app/org.ppsspp.ppsspp-2.apk")) {
VFSRegister("", new ZipAssetReader("/data/app/org.ppsspp.ppsspp-2.apk", "assets/"));
}
if (File::Exists("/data/app/org.ppsspp.ppsspp.apk")) {
VFSRegister("", new ZipAssetReader("/data/app/org.ppsspp.ppsspp.apk", "assets/"));
}
#endif

if (stateToLoad != NULL)
SaveState::Load(stateToLoad);

Expand Down

0 comments on commit 4c35c1b

Please sign in to comment.