mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Merge pull request #22896 from hrydgard/headless-http-games
Headless: Run a game over HTTP, and on Android without a JVM
This commit is contained in:
2 files changed
+9
-4
No files matched your search
@@ -51,8 +51,10 @@ void Init() {
|
||||
// either. HTTPSAvailable is cheap to ask twice - on Linux it's a cached dlopen result.
|
||||
#ifndef HTTPS_NOT_AVAILABLE
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
_assert_(gJvm != nullptr);
|
||||
naettInit(gJvm);
|
||||
// Headless has no JVM, and so no HTTPS.
|
||||
if (gJvm) {
|
||||
naettInit(gJvm);
|
||||
}
|
||||
#else
|
||||
if (HTTPSAvailable()) {
|
||||
naettInit(NULL);
|
||||
@@ -64,7 +66,9 @@ void Init() {
|
||||
bool HTTPSAvailable() {
|
||||
#ifdef HTTPS_NOT_AVAILABLE
|
||||
return false;
|
||||
#elif PPSSPP_PLATFORM(LINUX) && !PPSSPP_PLATFORM(ANDROID)
|
||||
#elif PPSSPP_PLATFORM(ANDROID)
|
||||
return gJvm != nullptr;
|
||||
#elif PPSSPP_PLATFORM(LINUX)
|
||||
return naettCurlLoad() != 0;
|
||||
#else
|
||||
return true;
|
||||
|
||||
@@ -860,7 +860,8 @@ int RunTests(GraphicsContext *graphicsContext, CoreParameter &coreParameter, con
|
||||
|
||||
for (size_t i = 0; i < testFilenames.size(); ++i) {
|
||||
coreParameter.fileToStart = Path(testFilenames[i]);
|
||||
if (!File::Exists(coreParameter.fileToStart)) {
|
||||
// An http:// game is streamed by the loader (HTTPFileLoader), which reports its own errors.
|
||||
if (coreParameter.fileToStart.Type() != PathType::HTTP && !File::Exists(coreParameter.fileToStart)) {
|
||||
fprintf(stderr, "File not found: %s\n", coreParameter.fileToStart.c_str());
|
||||
missingTests.push_back(testFilenames[i]);
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user