diff --git a/app/src/main/java/emu/skyline/input/onscreen/OnScreenControllerView.kt b/app/src/main/java/emu/skyline/input/onscreen/OnScreenControllerView.kt index f6b28f2f..9b581589 100644 --- a/app/src/main/java/emu/skyline/input/onscreen/OnScreenControllerView.kt +++ b/app/src/main/java/emu/skyline/input/onscreen/OnScreenControllerView.kt @@ -150,13 +150,13 @@ class OnScreenControllerView @JvmOverloads constructor(context : Context, attrs invalidate() } addListener(object : AnimatorListenerAdapter() { - override fun onAnimationCancel(animation : Animator?) { + override fun onAnimationCancel(animation : Animator) { super.onAnimationCancel(animation) onAnimationEnd(animation) onStickStateChangedListener?.invoke(joystick.stickId, PointF(0f, 0f)) } - override fun onAnimationEnd(animation : Animator?) { + override fun onAnimationEnd(animation : Animator) { super.onAnimationEnd(animation) if (joystick.shortDoubleTapped) onButtonStateChangedListener?.invoke(joystick.buttonId, ButtonState.Released) diff --git a/app/src/main/java/emu/skyline/utils/ByteBufferSerializable.kt b/app/src/main/java/emu/skyline/utils/ByteBufferSerializable.kt index db3935e0..d272fff6 100644 --- a/app/src/main/java/emu/skyline/utils/ByteBufferSerializable.kt +++ b/app/src/main/java/emu/skyline/utils/ByteBufferSerializable.kt @@ -52,9 +52,9 @@ interface ByteBufferSerializable : Parcelable { return 0 } - override fun writeToParcel(out : Parcel?, flags : Int) { - out?.writeString(this.javaClass.name) - out?.writeByteArray(this.writeToByteBuffer(ByteBuffer.allocate(ByteBufferSerializationData.getSerializationData(this::class).bytes)).array()) + override fun writeToParcel(out : Parcel, flags : Int) { + out.writeString(this.javaClass.name) + out.writeByteArray(this.writeToByteBuffer(ByteBuffer.allocate(ByteBufferSerializationData.getSerializationData(this::class).bytes)).array()) } class ParcelableCreator : Parcelable.ClassLoaderCreator {