mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Start .NET and Godot games under FEX without per-game setup (#168)
This commit is contained in:
1 parent
8502fc517b
commit
32ea22e033
4 files changed
+154
-3
No files matched your search
@@ -29,6 +29,12 @@ object GameEnvironment {
|
||||
"MESA_SHADER_CACHE_DISABLE" to "false",
|
||||
"VKD3D_FEATURE_LEVEL" to "12_2",
|
||||
"VKD3D_SHADER_MODEL" to "6_9",
|
||||
// .NET 7 and later reserve 256 GB of address space for the GC heap at startup, more than an
|
||||
// Android process has free, and the runtime fails to start. 32 GB is plenty for a game.
|
||||
"DOTNET_GCRegionRange" to "0x800000000",
|
||||
// .NET's W^X writes JIT code through a second mapping that FEX does not watch, so FEX keeps
|
||||
// running the stale translation and the game hangs at startup.
|
||||
"DOTNET_EnableWriteXorExecute" to "0",
|
||||
).apply {
|
||||
FexPreset.env(preset).forEach { put(it.substringBefore('='), it.substringAfter('=')) }
|
||||
}
|
||||
|
||||
@@ -36,6 +36,12 @@ class GameEnvironmentTest {
|
||||
assertEquals("6_9", restored["VKD3D_SHADER_MODEL"])
|
||||
}
|
||||
|
||||
@Test fun dotnetRuntimeFitsAndroidAddressSpaceForEveryGame() {
|
||||
val values = GameEnvironment.effective(GameEnvironment.Config(), "PERFORMANCE", "43")
|
||||
assertEquals("0x800000000", values["DOTNET_GCRegionRange"])
|
||||
assertEquals("0", values["DOTNET_EnableWriteXorExecute"])
|
||||
}
|
||||
|
||||
@Test fun multiSelectionPreservesCustomTokensAndRemovesToggledValues() {
|
||||
assertEquals("fps,custom_token,frametimes", GameEnvironmentOptions.toggle("fps,custom_token", "frametimes"))
|
||||
assertEquals("custom_token", GameEnvironmentOptions.toggle("fps,custom_token", "fps"))
|
||||
|
||||
Reference in new issue
Block a user