mirror of
https://github.com/ovrport/app.git
synced 2026-10-26 19:19:56 -04:00
fix: Fix MetaXRAudioWwise patch
This commit is contained in:
1 parent
1b081964d5
commit
16a28afa0a
2 files changed
+8
-3
No files matched your search
@@ -38,7 +38,12 @@ class FileTransformer(val file: File) {
|
||||
var matches = true
|
||||
|
||||
for (j in i..<bytes.size) {
|
||||
if (inputBytes[j] != "??" && bytes[j] != inputBytes[j].toByte(16)) {
|
||||
val checkIndex = j - i
|
||||
if (checkIndex >= inputBytes.size) {
|
||||
break
|
||||
}
|
||||
|
||||
if (inputBytes[checkIndex] != "??" && bytes[j].toUByte() != inputBytes[checkIndex].toUByte(16)) {
|
||||
matches = false
|
||||
break
|
||||
}
|
||||
@@ -46,7 +51,7 @@ class FileTransformer(val file: File) {
|
||||
|
||||
if (matches) {
|
||||
val replaced = bytes.slice(0..<i) +
|
||||
output.split(' ').map { it.toByte(16) } +
|
||||
output.split(' ').map { it.toUByte(16).toByte() } +
|
||||
bytes.slice(i+inputBytes.size..<bytes.size)
|
||||
file.writeBytes(replaced.toByteArray())
|
||||
return
|
||||
|
||||
@@ -237,7 +237,7 @@ object PatchStore {
|
||||
}
|
||||
}
|
||||
PATCHES += Patch("Patch MetaXRAudioWwise") {
|
||||
selectLibrary("liblibMetaXRAudioWwise.so") {
|
||||
selectLibrary("libMetaXRAudioWwise.so") {
|
||||
replaceHex(
|
||||
"57 D0 3B D5 40 EB FF F0 00 0C 2D 91 E8 16 40 F9 A8 83 1F F8 DC 7F 0B 94 00 01 00 B4 E3 03 00 AA 21 EB FF B0",
|
||||
"57 D0 3B D5 20 00 80 D2 1F 20 03 D5 E8 16 40 F9 A8 83 1F F8 1F 20 03 D5 00 01 00 B4 03 00 80 D2 21 EB FF B0"
|
||||
|
||||
Reference in new issue
Block a user