Kotlin updates for compatibility with the Android R SDK preview

This commit is contained in:
Billy Laws 2020-06-15 16:37:28 +01:00 committed by ◱ PixelyIon
parent 68fcb2e4e5
commit af709efb15
2 changed files with 5 additions and 5 deletions

View File

@ -189,23 +189,23 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback {
/**
* This sets [surface] to [holder].surface and passes it into libskyline
*/
override fun surfaceCreated(holder : SurfaceHolder?) {
override fun surfaceCreated(holder : SurfaceHolder) {
Log.d("surfaceCreated", "Holder: ${holder.toString()}")
surface = holder!!.surface
surface = holder.surface
setSurface(surface)
}
/**
* This is purely used for debugging surface changes
*/
override fun surfaceChanged(holder : SurfaceHolder?, format : Int, width : Int, height : Int) {
override fun surfaceChanged(holder : SurfaceHolder, format : Int, width : Int, height : Int) {
Log.d("surfaceChanged", "Holder: ${holder.toString()}, Format: $format, Width: $width, Height: $height")
}
/**
* This sets [surface] to null and passes it into libskyline
*/
override fun surfaceDestroyed(holder : SurfaceHolder?) {
override fun surfaceDestroyed(holder : SurfaceHolder) {
Log.d("surfaceDestroyed", "Holder: ${holder.toString()}")
surface = null
setSurface(surface)

View File

@ -105,7 +105,7 @@ class AppEntry : Serializable {
output.writeUTF(author)
output.writeBoolean(icon != null)
if (icon != null)
icon!!.compress(Bitmap.CompressFormat.WEBP, 100, output)
icon!!.compress(Bitmap.CompressFormat.WEBP_LOSSY, 100, output)
}
/**