Compare commits

...
2 Commits
Author SHA1 Message Date
dkeruza cafd6276c3 Workaround 6 2025-02-27 16:26:25 -05:00
dkeruza a2dbf1cbda Workaround 5 2025-02-27 15:43:56 -05:00
2 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ lindbergh.so: $(OBJS)
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
libsegaapi.so: src/libsegaapi/libsegaapi.o libsegaapi.so: src/libsegaapi/libsegaapi.o
$(CC) -m32 -O0 -g src/libsegaapi/libsegaapi.c -lFAudio -fPIC -shared -o $(BUILD)/libsegaapi.so $(CC) -m32 -O0 -g src/libsegaapi/libsegaapi.c -lFAudio -L/app/lib32 -fPIC -shared -o $(BUILD)/libsegaapi.so
libkswapapi.so: src/libkswapapi/libkswapapi.o libkswapapi.so: src/libkswapapi/libkswapapi.o
$(CC) -m32 src/libkswapapi/libkswapapi.o -fPIC -shared -o $(BUILD)/libkswapapi.so $(CC) -m32 src/libkswapapi/libkswapapi.o -fPIC -shared -o $(BUILD)/libkswapapi.so
+15 -4
View File
@@ -233,7 +233,7 @@ void testModePath(char *name)
* Makes sure the environment variables are set correctly * Makes sure the environment variables are set correctly
* to run the game. * to run the game.
*/ */
void setEnvironmentVariables(int isFlatpak) void setEnvironmentVariables(int isFlatpak, int zink)
{ {
// Ensure the library path is set correctly // Ensure the library path is set correctly
char libraryPath[128] = {0}; char libraryPath[128] = {0};
@@ -254,6 +254,9 @@ void setEnvironmentVariables(int isFlatpak)
setenv(LD_PRELOAD, PRELOAD_FILE_NAME, 1); setenv(LD_PRELOAD, PRELOAD_FILE_NAME, 1);
else else
setenv(LD_PRELOAD, PRELOAD_FILE_FLATPAK, 1); setenv(LD_PRELOAD, PRELOAD_FILE_FLATPAK, 1);
if(zink)
setenv("MESA_LOADER_DRIVER_OVERRIDE", "zink", 1);
} }
/** /**
@@ -400,13 +403,11 @@ int main(int argc, char *argv[])
} }
} }
// Ensure environment variables are set correctly
setEnvironmentVariables(isFlatpak);
// Build up the command to start the game // Build up the command to start the game
int testMode = 0; int testMode = 0;
int gdb = 0; int gdb = 0;
int zink = 0;
int forceGame = 0; int forceGame = 0;
int segaboot = 0; int segaboot = 0;
char extConfigPath[PATH_MAX] = {0}; char extConfigPath[PATH_MAX] = {0};
@@ -431,6 +432,13 @@ int main(int argc, char *argv[])
gdb = 1; gdb = 1;
continue; continue;
} }
if (strcmp(argv[i], "--zink") == 0)
{
zink = 1;
continue;
}
if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--config") == 0) if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--config") == 0)
{ {
if (i+1 >= argc) if (i+1 >= argc)
@@ -446,6 +454,9 @@ int main(int argc, char *argv[])
forceGame = 1; forceGame = 1;
} }
// Ensure environment variables are set correctly
setEnvironmentVariables(isFlatpak, zink);
char command[128] = {0}; char command[128] = {0};
strcpy(command, "./"); strcpy(command, "./");
if (forceGame) if (forceGame)