fix
This commit is contained in:
parent
61435809b6
commit
e1b5d4bc24
Binary file not shown.
|
@ -1 +1 @@
|
||||||
1724057726729
|
1724075588557
|
|
@ -14,12 +14,11 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.tungsten.fcl.R;
|
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.GameMenu;
|
||||||
import com.tungsten.fcl.control.JarExecutorMenu;
|
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.GameOption;
|
||||||
import com.tungsten.fcl.setting.MenuSetting;
|
|
||||||
import com.tungsten.fclauncher.bridge.FCLBridge;
|
import com.tungsten.fclauncher.bridge.FCLBridge;
|
||||||
import com.tungsten.fclauncher.keycodes.FCLKeycodes;
|
import com.tungsten.fclauncher.keycodes.FCLKeycodes;
|
||||||
import com.tungsten.fclauncher.keycodes.LwjglGlfwKeycode;
|
import com.tungsten.fclauncher.keycodes.LwjglGlfwKeycode;
|
||||||
|
@ -112,16 +111,13 @@ public class JVMActivity extends FCLActivity implements TextureView.SurfaceTextu
|
||||||
@Override
|
@Override
|
||||||
public boolean onSurfaceTextureDestroyed(@NonNull SurfaceTexture surfaceTexture) {
|
public boolean onSurfaceTextureDestroyed(@NonNull SurfaceTexture surfaceTexture) {
|
||||||
fclBridge.setSurfaceDestroyed(true);
|
fclBridge.setSurfaceDestroyed(true);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int output = 0;
|
private int output = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSurfaceTextureUpdated(@NonNull SurfaceTexture surfaceTexture) {
|
public void onSurfaceTextureUpdated(@NonNull SurfaceTexture surfaceTexture) {
|
||||||
if (textureView != null && textureView.getSurfaceTexture() != null) {
|
|
||||||
textureView.post(() -> onSurfaceTextureSizeChanged(textureView.getSurfaceTexture(), textureView.getWidth(), textureView.getHeight()));
|
|
||||||
}
|
|
||||||
if (output == 1) {
|
if (output == 1) {
|
||||||
menu.onGraphicOutput();
|
menu.onGraphicOutput();
|
||||||
output++;
|
output++;
|
||||||
|
|
|
@ -145,8 +145,10 @@ public class DefaultLauncher extends Launcher {
|
||||||
res.addDefault("-Dos.version=Android-", Build.VERSION.RELEASE);
|
res.addDefault("-Dos.version=Android-", Build.VERSION.RELEASE);
|
||||||
res.addDefault("-Dorg.lwjgl.opengl.libname=", "${gl_lib_name}");
|
res.addDefault("-Dorg.lwjgl.opengl.libname=", "${gl_lib_name}");
|
||||||
res.addDefault("-Dfml.earlyprogresswindow=", "false");
|
res.addDefault("-Dfml.earlyprogresswindow=", "false");
|
||||||
res.addDefault("-Dwindow.width=", options.getWidth() + "");
|
res.addDefault("-Dglfwstub.windowWidth=", options.getWidth() + "");
|
||||||
res.addDefault("-Dwindow.height=", options.getHeight() + "");
|
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.home=", options.getGameDir().getAbsolutePath());
|
||||||
res.addDefault("-Duser.language=", System.getProperty("user.language"));
|
res.addDefault("-Duser.language=", System.getProperty("user.language"));
|
||||||
res.addDefault("-Duser.timezone=", TimeZone.getDefault().getID());
|
res.addDefault("-Duser.timezone=", TimeZone.getDefault().getID());
|
||||||
|
|
|
@ -14,7 +14,7 @@ struct FCLInternal *fcl;
|
||||||
__attribute__((constructor)) void env_init() {
|
__attribute__((constructor)) void env_init() {
|
||||||
char* strptr_env = getenv("FCL_ENVIRON");
|
char* strptr_env = getenv("FCL_ENVIRON");
|
||||||
if (strptr_env == NULL) {
|
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));
|
fcl = malloc(sizeof(struct FCLInternal));
|
||||||
assert(fcl);
|
assert(fcl);
|
||||||
memset(fcl, 0 , sizeof(struct FCLInternal));
|
memset(fcl, 0 , sizeof(struct FCLInternal));
|
||||||
|
@ -23,7 +23,7 @@ __attribute__((constructor)) void env_init() {
|
||||||
setenv("FCL_ENVIRON", strptr_env, 1);
|
setenv("FCL_ENVIRON", strptr_env, 1);
|
||||||
free(strptr_env);
|
free(strptr_env);
|
||||||
} else {
|
} 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);
|
fcl = (void*) strtoul(strptr_env, NULL, 0x10);
|
||||||
}
|
}
|
||||||
__android_log_print(ANDROID_LOG_INFO, "Environ", "%p", fcl);
|
__android_log_print(ANDROID_LOG_INFO, "Environ", "%p", fcl);
|
||||||
|
|
|
@ -172,7 +172,7 @@ static void set_vulkan_ptr(void* ptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_vulkan() {
|
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
|
android_get_device_api_level() >= 28) { // the loader does not support below that
|
||||||
#ifdef ADRENO_POSSIBLE
|
#ifdef ADRENO_POSSIBLE
|
||||||
void* result = load_turnip_vulkan();
|
void* result = load_turnip_vulkan();
|
||||||
|
|
|
@ -7,11 +7,13 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "environ.h"
|
#include "environ.h"
|
||||||
|
|
||||||
struct pojav_environ_s *pojav_environ;
|
struct pojav_environ_s *pojav_environ;
|
||||||
|
|
||||||
__attribute__((constructor)) void env_init() {
|
__attribute__((constructor)) void env_init() {
|
||||||
char *strptr_env = getenv("POJAV_ENVIRON");
|
char *strptr_env = getenv("POJAV_ENVIRON");
|
||||||
if (strptr_env == NULL) {
|
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));
|
pojav_environ = malloc(sizeof(struct pojav_environ_s));
|
||||||
assert(pojav_environ);
|
assert(pojav_environ);
|
||||||
memset(pojav_environ, 0, sizeof(struct pojav_environ_s));
|
memset(pojav_environ, 0, sizeof(struct pojav_environ_s));
|
||||||
|
@ -19,7 +21,7 @@ __attribute__((constructor)) void env_init() {
|
||||||
setenv("POJAV_ENVIRON", strptr_env, 1);
|
setenv("POJAV_ENVIRON", strptr_env, 1);
|
||||||
free(strptr_env);
|
free(strptr_env);
|
||||||
} else {
|
} 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);
|
pojav_environ = (void *) strtoul(strptr_env, NULL, 0x10);
|
||||||
}
|
}
|
||||||
__android_log_print(ANDROID_LOG_INFO, "Environ", "%p", pojav_environ);
|
__android_log_print(ANDROID_LOG_INFO, "Environ", "%p", pojav_environ);
|
||||||
|
|
Loading…
Reference in New Issue