mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
Merge remote-tracking branch 'origin/main' into codex/unified-controller-input
This commit is contained in:
commit
aa3757eff1
41 files changed
+110
-165
No files matched your search
@@ -117,7 +117,10 @@ class SteamLaunchOptionsTest {
|
||||
assertTrue(SteamLaunchOptions.write(home, 1790600, "-dx12"))
|
||||
config.writeText(SteamLaunchOptions.withLaunchOptions(config.readText(), 1790600, "-vulkan")!!)
|
||||
assertEquals("-vulkan", SteamLaunchOptions.steam(home, 1790600))
|
||||
assertNull(SteamLaunchOptions.steam(home, 400))
|
||||
assertEquals("", SteamLaunchOptions.steam(home, 400))
|
||||
assertNull(SteamLaunchOptions.steam(steamHome(tmp.newFolder("Unread")), 1790600))
|
||||
config.writeText("")
|
||||
assertNull(SteamLaunchOptions.steam(home, 1790600))
|
||||
}
|
||||
|
||||
private val app get() = RuntimeEnvironment.getApplication()
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class SteamLaunchOptionsVisibilityTest {
|
||||
private fun game(library: String = "main", source: String = Library.SOURCE_STEAM) =
|
||||
Library.SteamGame(42, "Test game", null, library, source = source)
|
||||
|
||||
@Test fun nativeSteamGamesExposeLaunchOptionsOutsideShortcutPicking() {
|
||||
assertTrue(canEditSteamLaunchOptions(game(), shortcutPicker = false))
|
||||
}
|
||||
|
||||
@Test fun pickerAddedAndStoreGamesDoNotExposeSteamLaunchOptions() {
|
||||
assertFalse(canEditSteamLaunchOptions(game(), shortcutPicker = true))
|
||||
assertFalse(canEditSteamLaunchOptions(game(library = Library.ADDED), shortcutPicker = false))
|
||||
assertFalse(canEditSteamLaunchOptions(game(source = "gog"), shortcutPicker = false))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user