fix(YouTube - Playback speed): Remember playback speed when using non 1.0x default speed

This code was previously present with PR #3810 but was accidentally left out during the DSL migration.
This commit is contained in:
LisoUseInAIKyrios 2024-11-11 10:29:15 +04:00
parent 5e34910151
commit 05b9f87098

View File

@ -302,8 +302,14 @@ private fun getReference(instructions: List<BuilderInstruction>, offset: Int, op
/**
* Hook the video speed selected by the user.
*/
fun userSelectedPlaybackSpeedHook(targetMethodClass: String, targetMethodName: String) =
fun userSelectedPlaybackSpeedHook(targetMethodClass: String, targetMethodName: String) {
legacySpeedSelectionInsertMethod.addInstruction(
legacySpeedSelectionInsertIndex++,
"invoke-static { v$legacySpeedSelectionValueRegister }, $targetMethodClass->$targetMethodName(F)V"
)
speedSelectionInsertMethod.addInstruction(
speedSelectionInsertIndex++,
"invoke-static { v$speedSelectionValueRegister }, $targetMethodClass->$targetMethodName(F)V",
)
}