1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
This commit is contained in:
Fredia Huya-Kouadio
2025-02-10 10:02:48 -08:00
committed by Fredia Huya-Kouadio
parent 5da6deaaca
commit 2a66335ec2
3 changed files with 12 additions and 25 deletions

View File

@@ -75,7 +75,7 @@ abstract class GodotActivity : FragmentActivity(), GodotHost {
override fun onCreate(savedInstanceState: Bundle?) {
val params = intent.getStringArrayExtra(EXTRA_COMMAND_LINE_PARAMS)
Log.d(TAG, "Starting intent $intent with parameters ${params.contentToString()}")
updateCommandLineParams(params ?: emptyArray())
commandLineParams.addAll(params ?: emptyArray())
super.onCreate(savedInstanceState)
@@ -215,14 +215,5 @@ abstract class GodotActivity : FragmentActivity(), GodotHost {
return GodotFragment()
}
@CallSuper
protected open fun updateCommandLineParams(args: Array<String>) {
// Update the list of command line params with the new args
commandLineParams.clear()
if (args.isNotEmpty()) {
commandLineParams.addAll(args)
}
}
final override fun getCommandLine() = commandLineParams
override fun getCommandLine(): MutableList<String> = commandLineParams
}