Re-added log messages for attempting to add duplicate hooks

This commit is contained in:
OpenSauce04 2025-09-05 21:31:26 +01:00
parent 0f1ddc6e0e
commit 32c55e87a6

View File

@ -18,13 +18,17 @@ object EmulationLifecycleUtil {
}
fun addShutdownHook(hook: Runnable) {
if (!shutdownHooks.contains(hook)) {
if (shutdownHooks.contains(hook)) {
Log.warning("[EmulationLifecycleUtil] Tried to add shutdown hook for function that already existed. Skipping.")
} else {
shutdownHooks.add(hook)
}
}
fun addPauseResumeHook(hook: Runnable) {
if (!pauseResumeHooks.contains(hook)) {
if (pauseResumeHooks.contains(hook)) {
Log.warning("[EmulationLifecycleUtil] Tried to add pause resume hook for function that already existed. Skipping.")
} else {
pauseResumeHooks.add(hook)
}
}