mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-29 04:50:15 +02:00
Merge branch 'refs/heads/dev' into dev-gh
This commit is contained in:
commit
721106ae2b
@ -10,6 +10,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.compose.ui.window.Dialog
|
import androidx.compose.ui.window.Dialog
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.withContext
|
||||||
import me.rhunk.snapenhance.ui.setup.screens.SetupScreen
|
import me.rhunk.snapenhance.ui.setup.screens.SetupScreen
|
||||||
import me.rhunk.snapenhance.ui.util.AlertDialogs
|
import me.rhunk.snapenhance.ui.util.AlertDialogs
|
||||||
|
|
||||||
@ -51,7 +52,9 @@ class MappingsScreen : SetupScreen() {
|
|||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
|
|
||||||
goNext()
|
withContext(Dispatchers.Main) {
|
||||||
|
goNext()
|
||||||
|
}
|
||||||
}.onFailure {
|
}.onFailure {
|
||||||
isGenerating = false
|
isGenerating = false
|
||||||
infoText = context.translation["setup.mappings.generate_failure"] + "\n\n" + it.message
|
infoText = context.translation["setup.mappings.generate_failure"] + "\n\n" + it.message
|
||||||
|
@ -63,9 +63,17 @@ class SendOverride : Feature("Send Override") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set back the original snap duration
|
// set back the original snap duration
|
||||||
remove(2)
|
|
||||||
snapDocPlayback.getByteArray(2)?.let {
|
snapDocPlayback.getByteArray(2)?.let {
|
||||||
|
val originalHasSound = firstOrNull(2)?.toReader()?.getVarInt(5)
|
||||||
|
remove(2)
|
||||||
addBuffer(2, it)
|
addBuffer(2, it)
|
||||||
|
|
||||||
|
originalHasSound?.let { hasSound ->
|
||||||
|
edit(2) {
|
||||||
|
remove(5)
|
||||||
|
addVarInt(5, hasSound)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user