mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-13 22:37:07 +00:00
use android timezone instead of UTC
This commit is contained in:
parent
75058d850b
commit
09bc10b15d
1 changed files with 5 additions and 15 deletions
|
|
@ -23,6 +23,7 @@ import org.kenjinx.android.PerformanceMonitor
|
|||
import org.kenjinx.android.SystemLanguage
|
||||
import org.kenjinx.android.UiHandler
|
||||
import java.io.File
|
||||
import java.util.TimeZone
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
class MainViewModel(val activity: MainActivity) {
|
||||
|
|
@ -185,6 +186,7 @@ class MainViewModel(val activity: MainActivity) {
|
|||
semaphore.acquire()
|
||||
launchOnUiThread {
|
||||
// We are only able to initialize the emulation context on the main thread
|
||||
val tzId = TimeZone.getDefault().id
|
||||
success = KenjinxNative.deviceInitialize(
|
||||
settings.memoryManagerMode.ordinal,
|
||||
settings.useNce,
|
||||
|
|
@ -201,7 +203,7 @@ class MainViewModel(val activity: MainActivity) {
|
|||
false,
|
||||
settings.enableFsIntegrityChecks,
|
||||
settings.fsGlobalAccessLogMode,
|
||||
"UTC",
|
||||
tzId, // <<< Pass through Android device time zone
|
||||
settings.ignoreMissingServices
|
||||
)
|
||||
|
||||
|
|
@ -295,6 +297,7 @@ class MainViewModel(val activity: MainActivity) {
|
|||
semaphore.acquire()
|
||||
launchOnUiThread {
|
||||
// We are only able to initialize the emulation context on the main thread
|
||||
val tzId = TimeZone.getDefault().id
|
||||
success = KenjinxNative.deviceInitialize(
|
||||
settings.memoryManagerMode.ordinal,
|
||||
settings.useNce,
|
||||
|
|
@ -311,7 +314,7 @@ class MainViewModel(val activity: MainActivity) {
|
|||
false,
|
||||
settings.enableFsIntegrityChecks,
|
||||
settings.fsGlobalAccessLogMode,
|
||||
"UTC",
|
||||
tzId, // <<< Pass through Android device time zone
|
||||
settings.ignoreMissingServices
|
||||
)
|
||||
|
||||
|
|
@ -354,19 +357,6 @@ class MainViewModel(val activity: MainActivity) {
|
|||
fun purgeShaderCache(titleId: String) {
|
||||
if (titleId.isNotEmpty()) {
|
||||
val basePath = MainActivity.AppPath + "/games/$titleId/cache/shader"
|
||||
if (File(basePath).exists()) {
|
||||
var caches = mutableListOf<String>()
|
||||
File(basePath).listFiles()?.forEach {
|
||||
if (!it.isFile)
|
||||
it.delete()
|
||||
else {
|
||||
if (it.name.endsWith(".toc") || it.name.endsWith(".data"))
|
||||
caches.add(it.absolutePath)
|
||||
}
|
||||
}
|
||||
for (path in caches)
|
||||
File(path).delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue