Перенос добавления ресурсов в соответствующие патчи

This commit is contained in:
2025-09-14 20:37:14 +03:00
parent c22ef507ba
commit ac241e1189
7 changed files with 28 additions and 42 deletions
+13 -8
View File
@@ -1,14 +1,19 @@
"""Change application icon"""
"""Add custom video playback speed"""
priority = 0
import struct
def float_to_hex(f):
b = struct.pack(">f", f)
return b.hex()
from utils.smali_parser import float_to_hex
from utils.public import (
insert_after_public,
insert_after_id,
)
def apply(config: dict) -> bool:
assert float_to_hex(1.5) == "0x3fc00000"
last = "speed75"
for speed in config.get("speeds", []):
insert_after_public(last, f"speed{int(float(speed)*10)}")
insert_after_id(last, f"speed{int(float(speed)*10)}")
last = f"speed{int(float(speed)*10)}"
return False