mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
android: automatically load default libraries for known gamedirs, supported by mobile_hacks branch
This commit is contained in:
@@ -15,6 +15,9 @@ import org.libsdl.app.SDLActivity;
|
||||
|
||||
import su.xash.engine.util.AndroidBug5497Workaround;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class XashActivity extends SDLActivity {
|
||||
private boolean mUseVolumeKeys;
|
||||
private String mPackageName;
|
||||
@@ -149,6 +152,19 @@ public class XashActivity extends SDLActivity {
|
||||
|
||||
String argv = getIntent().getStringExtra("argv");
|
||||
if (argv == null) argv = "-console -log";
|
||||
|
||||
// stupid check but should be enough
|
||||
if (argv.indexOf(" -dll ") < 0 && gamelibdir == null) {
|
||||
// mobile_hacks hlsdk-portable branch allows us to have few more mods
|
||||
final List<String> mobile_hacks_gamedirs = Arrays.asList(new String[]{
|
||||
"aom", "bdlands", "biglolly", "bshift", "caseclosed",
|
||||
"hl_urbicide", "induction", "redempt", "secret",
|
||||
"sewer_beta", "tot", "vendetta" });
|
||||
|
||||
if (mobile_hacks_gamedirs.contains(gamedir))
|
||||
argv += " -dll @hl";
|
||||
}
|
||||
|
||||
return argv.split(" ");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user