mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
feat: show Steam launch options on the Launch tab (#2163)
* Show Steam launch options on the Launch tab * fix: Launch options is one row on the Launch tab, like the shortcut fields * fix(launch): reread Steam's launch options when the game page resumes * fix(launch): keep launch options disabled while they reload on resume * fix(launch): a saved launch option is not replaced by a read that started before it * fix(launch): an unreadable Steam config keeps the shown launch options instead of clearing them * fix(launch): an unparsable Steam config and a pending reload keep the shown launch options * fix(launch): the resume reload follows the game the panel shows --------- Co-authored-by: maxjivi05 <maxjividen@gmail.com>
This commit is contained in:
1 parent
d6566f0dbe
commit
a1bc8467fd
5 files changed
+109
-46
No files matched your search
@@ -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