From 8c6f75e09e68ae7280c80880aba15126529f67fb Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 23 Sep 2023 05:51:02 +0200 Subject: [PATCH] early-access version 3890 --- README.md | 2 +- .../java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 017eed541..e4dc16f44 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3889. +This is the source code for early-access 3890. ## Legal Notice diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index 54993a958..6fa847631 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -50,6 +50,7 @@ import org.yuzu.yuzu_emu.model.TaskViewModel import org.yuzu.yuzu_emu.utils.* import java.io.BufferedInputStream import java.io.BufferedOutputStream +import java.io.FileInputStream import java.io.FileOutputStream import java.util.zip.ZipEntry import java.util.zip.ZipInputStream @@ -639,7 +640,15 @@ class MainActivity : AppCompatActivity(), ThemeProvider { file.path.length ) stream.putNextEntry(ZipEntry(newPath)) - stream.write(file.readBytes()) + + val buffer = ByteArray(8096) + var read: Int + FileInputStream(file).use { fis -> + while (fis.read(buffer).also { read = it } != -1) { + stream.write(buffer, 0, read) + } + } + stream.closeEntry() } }