diff options
| author | 2023-04-09 13:34:33 -0600 | |
|---|---|---|
| committer | 2023-06-03 00:05:50 -0700 | |
| commit | 5aec62930c6eece372a48fd36c959ea01521ef10 (patch) | |
| tree | e492c3da56b990b35d761561fc46d79d488b7d3f /src/android | |
| parent | android: Scale input overlay independently of system display scale (diff) | |
| download | yuzu-5aec62930c6eece372a48fd36c959ea01521ef10.tar.gz yuzu-5aec62930c6eece372a48fd36c959ea01521ef10.tar.xz yuzu-5aec62930c6eece372a48fd36c959ea01521ef10.zip | |
android: Remove unsafe null check
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt index 895d33abf..c0dc8ce76 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt | |||
| @@ -8,10 +8,8 @@ import android.content.Context | |||
| 8 | import android.content.SharedPreferences | 8 | import android.content.SharedPreferences |
| 9 | import android.content.res.Configuration | 9 | import android.content.res.Configuration |
| 10 | import android.graphics.Bitmap | 10 | import android.graphics.Bitmap |
| 11 | import android.graphics.BitmapFactory | ||
| 12 | import android.graphics.Canvas | 11 | import android.graphics.Canvas |
| 13 | import android.graphics.Rect | 12 | import android.graphics.Rect |
| 14 | import android.graphics.drawable.BitmapDrawable | ||
| 15 | import android.graphics.drawable.Drawable | 13 | import android.graphics.drawable.Drawable |
| 16 | import android.graphics.drawable.VectorDrawable | 14 | import android.graphics.drawable.VectorDrawable |
| 17 | import android.hardware.Sensor | 15 | import android.hardware.Sensor |
| @@ -606,8 +604,8 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : SurfaceView(context | |||
| 606 | // If we have API access, calculate the safe area to draw the overlay | 604 | // If we have API access, calculate the safe area to draw the overlay |
| 607 | var cutoutLeft = 0 | 605 | var cutoutLeft = 0 |
| 608 | var cutoutBottom = 0 | 606 | var cutoutBottom = 0 |
| 609 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | 607 | val insets = windowInsets.displayCutout |
| 610 | val insets = windowInsets.displayCutout!! | 608 | if (insets != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { |
| 611 | maxY = | 609 | maxY = |
| 612 | if (insets.boundingRectTop.bottom != 0) insets.boundingRectTop.bottom.toFloat() else maxY | 610 | if (insets.boundingRectTop.bottom != 0) insets.boundingRectTop.bottom.toFloat() else maxY |
| 613 | maxX = | 611 | maxX = |