Fix the Ok Zoomer compatibility on newer versions

This commit is contained in:
Username404 2021-07-16 15:22:29 +02:00
parent 4bc41e3b38
commit 735de8d0b7
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 2 deletions

View File

@ -52,10 +52,10 @@ private val okZoomerPairs by lazy {
} catch (e: ClassNotFoundException) { } catch (e: ClassNotFoundException) {
with(Class.forName("io.github.ennuil.okzoomer.utils.ZoomUtils").getDeclaredField("zoomerZoom")) { with(Class.forName("io.github.ennuil.okzoomer.utils.ZoomUtils").getDeclaredField("zoomerZoom")) {
get(null).javaClass.run { get(null).javaClass.run {
(getField("zoomDivisor") to this@with) to (getField("zoom") to this@with) (getDeclaredField("zoomDivisor") to this@with.get(null)) to (getDeclaredField("zoom") to this@with.get(null))
} }
} }
} }.apply { first.first.isAccessible = true; second.first.isAccessible = true; }
} }
fun fabricZoom() { fun fabricZoom() {