This commit is contained in:
ShirosakiMio 2024-08-19 21:53:46 +08:00
parent 61435809b6
commit e1b5d4bc24
7 changed files with 21 additions and 21 deletions

View File

@ -1 +1 @@
1724057726729
1724075588557

View File

@ -14,12 +14,11 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.tungsten.fcl.R;
import com.tungsten.fcl.control.MenuCallback;
import com.tungsten.fcl.control.MenuType;
import com.tungsten.fcl.control.GameMenu;
import com.tungsten.fcl.control.JarExecutorMenu;
import com.tungsten.fcl.control.MenuCallback;
import com.tungsten.fcl.control.MenuType;
import com.tungsten.fcl.setting.GameOption;
import com.tungsten.fcl.setting.MenuSetting;
import com.tungsten.fclauncher.bridge.FCLBridge;
import com.tungsten.fclauncher.keycodes.FCLKeycodes;
import com.tungsten.fclauncher.keycodes.LwjglGlfwKeycode;
@ -112,16 +111,13 @@ public class JVMActivity extends FCLActivity implements TextureView.SurfaceTextu
@Override
public boolean onSurfaceTextureDestroyed(@NonNull SurfaceTexture surfaceTexture) {
fclBridge.setSurfaceDestroyed(true);
return false;
return true;
}
private int output = 0;
@Override
public void onSurfaceTextureUpdated(@NonNull SurfaceTexture surfaceTexture) {
if (textureView != null && textureView.getSurfaceTexture() != null) {
textureView.post(() -> onSurfaceTextureSizeChanged(textureView.getSurfaceTexture(), textureView.getWidth(), textureView.getHeight()));
}
if (output == 1) {
menu.onGraphicOutput();
output++;

View File

@ -145,8 +145,10 @@ public class DefaultLauncher extends Launcher {
res.addDefault("-Dos.version=Android-", Build.VERSION.RELEASE);
res.addDefault("-Dorg.lwjgl.opengl.libname=", "${gl_lib_name}");
res.addDefault("-Dfml.earlyprogresswindow=", "false");
res.addDefault("-Dwindow.width=", options.getWidth() + "");
res.addDefault("-Dwindow.height=", options.getHeight() + "");
res.addDefault("-Dglfwstub.windowWidth=", options.getWidth() + "");
res.addDefault("-Dglfwstub.windowHeight=", options.getHeight() + "");
res.addDefault("-Dglfwstub.initEgl=", "false");
res.addDefault("-Dloader.disable_forked_guis=", "true");
res.addDefault("-Duser.home=", options.getGameDir().getAbsolutePath());
res.addDefault("-Duser.language=", System.getProperty("user.language"));
res.addDefault("-Duser.timezone=", TimeZone.getDefault().getID());

View File

@ -14,7 +14,7 @@ struct FCLInternal *fcl;
__attribute__((constructor)) void env_init() {
char* strptr_env = getenv("FCL_ENVIRON");
if (strptr_env == NULL) {
__android_log_print(ANDROID_LOG_INFO, "Environ", "No environ found, creating...");
__android_log_print(ANDROID_LOG_INFO, "Environ", "No FCL environ found, creating...");
fcl = malloc(sizeof(struct FCLInternal));
assert(fcl);
memset(fcl, 0 , sizeof(struct FCLInternal));
@ -23,7 +23,7 @@ __attribute__((constructor)) void env_init() {
setenv("FCL_ENVIRON", strptr_env, 1);
free(strptr_env);
} else {
__android_log_print(ANDROID_LOG_INFO, "Environ", "Found existing environ: %s", strptr_env);
__android_log_print(ANDROID_LOG_INFO, "Environ", "Found existing FCL environ: %s", strptr_env);
fcl = (void*) strtoul(strptr_env, NULL, 0x10);
}
__android_log_print(ANDROID_LOG_INFO, "Environ", "%p", fcl);

View File

@ -172,7 +172,7 @@ static void set_vulkan_ptr(void* ptr) {
}
void load_vulkan() {
if(getenv("POJAV_ZINK_PREFER_SYSTEM_DRIVER") == NULL &&
if(getenv("VULKAN_DRIVER_SYSTEM") == NULL &&
android_get_device_api_level() >= 28) { // the loader does not support below that
#ifdef ADRENO_POSSIBLE
void* result = load_turnip_vulkan();

View File

@ -7,11 +7,13 @@
#include <assert.h>
#include <string.h>
#include "environ.h"
struct pojav_environ_s *pojav_environ;
__attribute__((constructor)) void env_init() {
char *strptr_env = getenv("POJAV_ENVIRON");
if (strptr_env == NULL) {
__android_log_print(ANDROID_LOG_INFO, "Environ", "No environ found, creating...");
__android_log_print(ANDROID_LOG_INFO, "Environ", "No Pojav environ found, creating...");
pojav_environ = malloc(sizeof(struct pojav_environ_s));
assert(pojav_environ);
memset(pojav_environ, 0, sizeof(struct pojav_environ_s));
@ -19,7 +21,7 @@ __attribute__((constructor)) void env_init() {
setenv("POJAV_ENVIRON", strptr_env, 1);
free(strptr_env);
} else {
__android_log_print(ANDROID_LOG_INFO, "Environ", "Found existing environ: %s", strptr_env);
__android_log_print(ANDROID_LOG_INFO, "Environ", "Foun Pojavd existing environ: %s", strptr_env);
pojav_environ = (void *) strtoul(strptr_env, NULL, 0x10);
}
__android_log_print(ANDROID_LOG_INFO, "Environ", "%p", pojav_environ);