mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-06 09:07:19 +02:00
[vulkan] Fix regressions found in last stable release (#3953)
This PR aims to fix some regressions found in the latest release 0.2.0, which were a bunch of constant crashes/ random on certain Android devices with issues with the PiP configuration, addressing some problems founds for AMD after the maintenance of 2nd Global Vulkan Maintenance. -> Fixes Final Fantasy Tactics on AMD (no longer requires of generic bits to work "all commands bit") -> Fixes some performance regressions on android due to the Tomodachi fix applied globally as common behavior (#3898, #3900) -> Fixes blittering of screen found on ARM Windows devices and QCOM stock drivers (Android and ARM Windows) related to Mario Kart 8 Deluxe strange blittering in races, caused by a strange race condition with the ResetQueryPool and mostly the workaround for presync -> Fixes issues on Luigi's Mansion 3 issue where the pause screen became black on AMD due to the early reset of queries. -> Fixes crashes on Mario Party Jamboree for AMD/ Nvidia. -> Keeps previous fixes related to crashes on AMD with other games such as Astral Chain, Fire Emblem Three Houses and Xenoblade 3 based on the lack of access to vertex fragment replaced with generic flags. -> Fixes TOTK RADV skybox lighting. -------- Credits: @melod-y @Gidoly @MaranBr @AlexWolff @Lizzie And all the people who contributed into the reporting issues/ helping with the bisect. Co-authored-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3953 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
bd2d344040
commit
3d19743d95
17 changed files with 79 additions and 111 deletions
|
|
@ -15,7 +15,6 @@ import android.content.BroadcastReceiver
|
|||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Rect
|
||||
import android.graphics.drawable.Icon
|
||||
|
|
@ -101,7 +100,6 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
private var romSwapGeneration = 0
|
||||
private var hasEmulationSession = processHasEmulationSession
|
||||
private val romSwapStopTimeoutRunnable = Runnable { onRomSwapStopTimeout() }
|
||||
private val pictureInPictureFailureActions: MutableSet<String> = mutableSetOf()
|
||||
|
||||
private fun onRomSwapStopTimeout() {
|
||||
if (!isWaitingForRomSwapStop) {
|
||||
|
|
@ -270,18 +268,12 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
}
|
||||
|
||||
override fun onUserLeaveHint() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ||
|
||||
!isPictureInPictureSupported() ||
|
||||
!BooleanSetting.PICTURE_IN_PICTURE.getBoolean() ||
|
||||
isInPictureInPictureMode
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
val pictureInPictureParamsBuilder = PictureInPictureParams.Builder()
|
||||
.getPictureInPictureActionsBuilder().getPictureInPictureAspectBuilder()
|
||||
runPictureInPictureAction("enter picture-in-picture mode") {
|
||||
enterPictureInPictureMode(pictureInPictureParamsBuilder.build())
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
|
||||
if (BooleanSetting.PICTURE_IN_PICTURE.getBoolean() && !isInPictureInPictureMode) {
|
||||
val pictureInPictureParamsBuilder = PictureInPictureParams.Builder()
|
||||
.getPictureInPictureActionsBuilder().getPictureInPictureAspectBuilder()
|
||||
enterPictureInPictureMode(pictureInPictureParamsBuilder.build())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -661,29 +653,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
return this.apply { setActions(pictureInPictureActions) }
|
||||
}
|
||||
|
||||
private fun isPictureInPictureSupported() =
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||
packageManager.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE)
|
||||
|
||||
private fun runPictureInPictureAction(actionName: String, action: () -> Unit) {
|
||||
try {
|
||||
action()
|
||||
} catch (e: IllegalStateException) {
|
||||
if (pictureInPictureFailureActions.add(actionName)) {
|
||||
Log.warning("[PiP] Failed to $actionName: ${e.message}")
|
||||
}
|
||||
} catch (e: UnsupportedOperationException) {
|
||||
if (pictureInPictureFailureActions.add(actionName)) {
|
||||
Log.warning("[PiP] Failed to $actionName: ${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun buildPictureInPictureParams() {
|
||||
if (!isPictureInPictureSupported()) {
|
||||
return
|
||||
}
|
||||
|
||||
val pictureInPictureParamsBuilder = PictureInPictureParams.Builder()
|
||||
.getPictureInPictureActionsBuilder().getPictureInPictureAspectBuilder()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
|
|
@ -693,9 +663,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
BooleanSetting.PICTURE_IN_PICTURE.getBoolean() && isEmulationActive
|
||||
)
|
||||
}
|
||||
runPictureInPictureAction("set picture-in-picture params") {
|
||||
setPictureInPictureParams(pictureInPictureParamsBuilder.build())
|
||||
}
|
||||
setPictureInPictureParams(pictureInPictureParamsBuilder.build())
|
||||
}
|
||||
|
||||
fun displayMultiplayerDialog() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue