mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-24 04:15:48 +01:00
refactor: prepare for settings patch (#168)
This commit is contained in:
parent
93b66c7163
commit
cc3ce9aaad
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.interaction.swipecontrols.patch
|
||||
package app.revanced.patches.youtube.interaction.swipecontrols.patch.bytecode
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -12,6 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||
import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility
|
||||
import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.WatchWhileOnStartFingerprint
|
||||
import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.playeroverlay.patch.PlayerOverlaysHookPatch
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
@ -26,10 +27,10 @@ import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
IntegrationsPatch::class,
|
||||
PlayerTypeHookPatch::class,
|
||||
PlayerOverlaysHookPatch::class,
|
||||
SwipeControlsResourcesPatch::class
|
||||
SwipeControlsResourcePatch::class
|
||||
]
|
||||
)
|
||||
class SwipeControlsPatch : BytecodePatch(
|
||||
class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
WatchWhileOnStartFingerprint
|
||||
)
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.interaction.swipecontrols.patch
|
||||
package app.revanced.patches.youtube.interaction.swipecontrols.patch.resource
|
||||
|
||||
import app.revanced.extensions.injectResources
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -12,7 +12,7 @@ import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeCo
|
||||
@Name("swipe-controls-resource-patch")
|
||||
@SwipeControlsCompatibility
|
||||
@Version("0.0.1")
|
||||
class SwipeControlsResourcesPatch : ResourcePatch() {
|
||||
class SwipeControlsResourcePatch : ResourcePatch() {
|
||||
override fun execute(data: ResourceData): PatchResult {
|
||||
val resourcesDir = "swipecontrols"
|
||||
|
@ -56,7 +56,7 @@ class CustomPlaybackSpeedPatch : BytecodePatch(
|
||||
|
||||
val arrayLengthConstDestination = (arrayLengthConst as OneRegisterInstruction).registerA
|
||||
|
||||
val videoSpeedsArrayType = "Lapp/revanced/integrations/videoplayer/videosettings/VideoSpeed;->videoSpeeds:[F"
|
||||
val videoSpeedsArrayType = "Lapp/revanced/integrations/patches/VideoSpeedPatch;->videoSpeeds:[F"
|
||||
|
||||
arrayGenMethod.addInstructions(
|
||||
arrayLengthConstIndex + 1,
|
||||
|
Loading…
Reference in New Issue
Block a user