Skip to content

Commit

Permalink
Headless: Fix font tests on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Jan 22, 2022
1 parent 5c5fdb4 commit 85d868a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions headless/Headless.cpp
Expand Up @@ -409,13 +409,14 @@ int main(int argc, const char* argv[])
g_Config.iGlobalVolume = VOLUME_FULL;
g_Config.iReverbVolume = VOLUME_FULL;

#ifdef _WIN32
#if PPSSPP_PLATFORM(WINDOWS)
g_Config.internalDataDirectory.clear();
InitSysDirectories();
#endif

#if !defined(__ANDROID__) && !defined(_WIN32)
#if !PPSSPP_PLATFORM(ANDROID) && !PPSSPP_PLATFORM(WINDOWS)
g_Config.memStickDirectory = Path(std::string(getenv("HOME"))) / ".ppsspp";
g_Config.flash0Directory = File::GetExeDirectory() / "assets/flash0";
#endif

// Try to find the flash0 directory. Often this is from a subdirectory.
Expand All @@ -432,14 +433,16 @@ int main(int argc, const char* argv[])
if (screenshotFilename != 0)
headlessHost->SetComparisonScreenshot(Path(std::string(screenshotFilename)));

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

UpdateUIState(UISTATE_INGAME);
Expand Down

0 comments on commit 85d868a

Please sign in to comment.