summaryrefslogtreecommitdiff
path: root/src/android/app
diff options
context:
space:
mode:
authorGravatar t8952023-12-10 20:47:32 -0500
committerGravatar t8952023-12-12 17:25:37 -0500
commitca5b135ddfce90da05c149bd0b89befd3a59d256 (patch)
tree1b4a766bf58d4dd327b4998d47600a5cd8f623d1 /src/android/app
parentandroid: Add JNI initialization information for Game class (diff)
downloadyuzu-ca5b135ddfce90da05c149bd0b89befd3a59d256.tar.gz
yuzu-ca5b135ddfce90da05c149bd0b89befd3a59d256.tar.xz
yuzu-ca5b135ddfce90da05c149bd0b89befd3a59d256.zip
android: Expose MemoryUtil size formatting function
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt4
-rw-r--r--src/android/app/src/main/res/values/strings.xml1
2 files changed, 3 insertions, 2 deletions
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.kt
index 9076a86c4..0b94c73e5 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 {
27 const val Pb = Tb * 1024 27 const val Pb = Tb * 1024
28 const val Eb = Pb * 1024 28 const val Eb = Pb * 1024
29 29
30 private fun bytesToSizeUnit(size: Float, roundUp: Boolean = false): String = 30 fun bytesToSizeUnit(size: Float, roundUp: Boolean = false): String =
31 when { 31 when {
32 size < Kb -> { 32 size < Kb -> {
33 context.getString( 33 context.getString(
34 R.string.memory_formatted, 34 R.string.memory_formatted,
35 size.hundredths, 35 size.hundredths,
36 context.getString(R.string.memory_byte) 36 context.getString(R.string.memory_byte_shorthand)
37 ) 37 )
38 } 38 }
39 size < Mb -> { 39 size < Mb -> {
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml
index cd5571aa9..50879b3a3 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 @@
414 414
415 <!-- Memory Sizes --> 415 <!-- Memory Sizes -->
416 <string name="memory_byte">Byte</string> 416 <string name="memory_byte">Byte</string>
417 <string name="memory_byte_shorthand">B</string>
417 <string name="memory_kilobyte">KB</string> 418 <string name="memory_kilobyte">KB</string>
418 <string name="memory_megabyte">MB</string> 419 <string name="memory_megabyte">MB</string>
419 <string name="memory_gigabyte">GB</string> 420 <string name="memory_gigabyte">GB</string>