mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-27 02:44:17 +01:00
Fix Kotlin compilation errors from incorrect overloading of null-safe types
This commit is contained in:
parent
bf491f71f9
commit
c4bf92a49f
@ -150,13 +150,13 @@ class OnScreenControllerView @JvmOverloads constructor(context : Context, attrs
|
|||||||
invalidate()
|
invalidate()
|
||||||
}
|
}
|
||||||
addListener(object : AnimatorListenerAdapter() {
|
addListener(object : AnimatorListenerAdapter() {
|
||||||
override fun onAnimationCancel(animation : Animator?) {
|
override fun onAnimationCancel(animation : Animator) {
|
||||||
super.onAnimationCancel(animation)
|
super.onAnimationCancel(animation)
|
||||||
onAnimationEnd(animation)
|
onAnimationEnd(animation)
|
||||||
onStickStateChangedListener?.invoke(joystick.stickId, PointF(0f, 0f))
|
onStickStateChangedListener?.invoke(joystick.stickId, PointF(0f, 0f))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAnimationEnd(animation : Animator?) {
|
override fun onAnimationEnd(animation : Animator) {
|
||||||
super.onAnimationEnd(animation)
|
super.onAnimationEnd(animation)
|
||||||
if (joystick.shortDoubleTapped)
|
if (joystick.shortDoubleTapped)
|
||||||
onButtonStateChangedListener?.invoke(joystick.buttonId, ButtonState.Released)
|
onButtonStateChangedListener?.invoke(joystick.buttonId, ButtonState.Released)
|
||||||
|
@ -52,9 +52,9 @@ interface ByteBufferSerializable : Parcelable {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun writeToParcel(out : Parcel?, flags : Int) {
|
override fun writeToParcel(out : Parcel, flags : Int) {
|
||||||
out?.writeString(this.javaClass.name)
|
out.writeString(this.javaClass.name)
|
||||||
out?.writeByteArray(this.writeToByteBuffer(ByteBuffer.allocate(ByteBufferSerializationData.getSerializationData(this::class).bytes)).array())
|
out.writeByteArray(this.writeToByteBuffer(ByteBuffer.allocate(ByteBufferSerializationData.getSerializationData(this::class).bytes)).array())
|
||||||
}
|
}
|
||||||
|
|
||||||
class ParcelableCreator : Parcelable.ClassLoaderCreator<ByteBufferSerializable> {
|
class ParcelableCreator : Parcelable.ClassLoaderCreator<ByteBufferSerializable> {
|
||||||
|
Loading…
Reference in New Issue
Block a user