mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-12 12:34:36 +02:00
add support YouTube v18.17.43
This commit is contained in:
parent
7252e32005
commit
2b5b28003f
@ -10,7 +10,8 @@ import app.revanced.patcher.annotation.Package
|
|||||||
"18.13.38",
|
"18.13.38",
|
||||||
"18.14.41",
|
"18.14.41",
|
||||||
"18.15.40",
|
"18.15.40",
|
||||||
"18.16.39"
|
"18.16.39",
|
||||||
|
"18.17.43"
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
|
@ -10,7 +10,6 @@ import app.revanced.patcher.extensions.instruction
|
|||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
@ -118,15 +117,18 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
insertInstructions.indexOf(it) to (it as FiveRegisterInstruction).registerD
|
insertInstructions.indexOf(it) to (it as FiveRegisterInstruction).registerD
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drawRectangleInstructions.size < 4)
|
/**
|
||||||
return PatchResultError("Couldn't find drawRect reference")
|
* Deprecated in YouTube v18.17.43+.
|
||||||
|
* TODO: remove code from integrations
|
||||||
mapOf(
|
*/
|
||||||
"setSponsorBarAbsoluteLeft" to 3,
|
if (drawRectangleInstructions.size > 3) {
|
||||||
"setSponsorBarAbsoluteRight" to 0
|
mapOf(
|
||||||
).forEach { (string, int) ->
|
"setSponsorBarAbsoluteLeft" to 3,
|
||||||
val (index, register) = drawRectangleInstructions[int]
|
"setSponsorBarAbsoluteRight" to 0
|
||||||
injectCallRectangle(index, register, string)
|
).forEach { (string, int) ->
|
||||||
|
val (index, register) = drawRectangleInstructions[int]
|
||||||
|
injectCallRectangle(index, register, string)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user