VERY experimental Nintendo Switch 2 emulator
C++
android: Expose MemoryUtil size formatting function
t8951a2f96badbb0
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.ktindex 9076a86c41..0b94c73e52 100644--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt@@ -27,13 +27,13 @@ object MemoryUtil {const val Pb = Tb * 1024const val Eb = Pb * 1024- private fun bytesToSizeUnit(size: Float, roundUp: Boolean = false): String =+ fun bytesToSizeUnit(size: Float, roundUp: Boolean = false): String =when {size < Kb -> {context.getString(R.string.memory_formatted,size.hundredths,- context.getString(R.string.memory_byte)+ context.getString(R.string.memory_byte_shorthand))}size < Mb -> {diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xmlindex cd5571aa9c..50879b3a3a 100644--- a/src/android/app/src/main/res/values/strings.xml+++ b/src/android/app/src/main/res/values/strings.xml@@ -414,6 +414,7 @@<!-- Memory Sizes --><string name="memory_byte">Byte</string>+ <string name="memory_byte_shorthand">B</string><string name="memory_kilobyte">KB</string><string name="memory_megabyte">MB</string><string name="memory_gigabyte">GB</string>