mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-05-01 07:04:35 +02:00
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:
parent
5e34910151
commit
05b9f87098
@ -302,8 +302,14 @@ private fun getReference(instructions: List<BuilderInstruction>, offset: Int, op
|
|||||||
/**
|
/**
|
||||||
* Hook the video speed selected by the user.
|
* 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(
|
speedSelectionInsertMethod.addInstruction(
|
||||||
speedSelectionInsertIndex++,
|
speedSelectionInsertIndex++,
|
||||||
"invoke-static { v$speedSelectionValueRegister }, $targetMethodClass->$targetMethodName(F)V",
|
"invoke-static { v$speedSelectionValueRegister }, $targetMethodClass->$targetMethodName(F)V",
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user