early-access version 3890

This commit is contained in:
pineappleEA 2023-09-23 05:51:02 +02:00
parent 245139afa1
commit 8c6f75e09e
2 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3889. This is the source code for early-access 3890.
## Legal Notice ## Legal Notice

View File

@ -50,6 +50,7 @@ import org.yuzu.yuzu_emu.model.TaskViewModel
import org.yuzu.yuzu_emu.utils.* import org.yuzu.yuzu_emu.utils.*
import java.io.BufferedInputStream import java.io.BufferedInputStream
import java.io.BufferedOutputStream import java.io.BufferedOutputStream
import java.io.FileInputStream
import java.io.FileOutputStream import java.io.FileOutputStream
import java.util.zip.ZipEntry import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream import java.util.zip.ZipInputStream
@ -639,7 +640,15 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
file.path.length file.path.length
) )
stream.putNextEntry(ZipEntry(newPath)) 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() stream.closeEntry()
} }
} }