diff --git a/.idea/render.experimental.xml b/.idea/render.experimental.xml new file mode 100644 index 0000000..8ec256a --- /dev/null +++ b/.idea/render.experimental.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index c84b03c..8427894 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -2,4 +2,4 @@ -keep class emu.zenith.data.ZenithSettings { public java.lang.Object getEnvStateVar(java.lang.String); } --keep class emu.zenith.data.KernelModel \ No newline at end of file +-keep class emu.zenith.data.KernelModel diff --git a/app/src/main/assets/countries/ch.png b/app/src/main/assets/countries/ch.png new file mode 100644 index 0000000..de18720 Binary files /dev/null and b/app/src/main/assets/countries/ch.png differ diff --git a/app/src/main/assets/countries/eu.png b/app/src/main/assets/countries/eu.png new file mode 100644 index 0000000..471549d Binary files /dev/null and b/app/src/main/assets/countries/eu.png differ diff --git a/app/src/main/assets/countries/hk.png b/app/src/main/assets/countries/hk.png new file mode 100644 index 0000000..6232e8f Binary files /dev/null and b/app/src/main/assets/countries/hk.png differ diff --git a/app/src/main/assets/countries/jp.png b/app/src/main/assets/countries/jp.png index 384e7d7..8d76f92 100644 Binary files a/app/src/main/assets/countries/jp.png and b/app/src/main/assets/countries/jp.png differ diff --git a/app/src/main/assets/countries/us.png b/app/src/main/assets/countries/us.png index aba66a8..d9cd5b3 100644 Binary files a/app/src/main/assets/countries/us.png and b/app/src/main/assets/countries/us.png differ diff --git a/app/src/main/cpp/zenith/fs/bios_loader.cpp b/app/src/main/cpp/zenith/fs/bios_loader.cpp index d1de06b..473768d 100644 --- a/app/src/main/cpp/zenith/fs/bios_loader.cpp +++ b/app/src/main/cpp/zenith/fs/bios_loader.cpp @@ -25,8 +25,6 @@ namespace zenith::fs { } bool BiosLoader::loadBios(JNIEnv* android, kernel::KernelModel &model) { - if (!scpRomHeader) - return false; biosf = model.fd; biosf.read(std::span{scpRomHeader, hdrSize}); @@ -102,8 +100,9 @@ namespace zenith::fs { auto biosModel{fmt::format("{} v{}.{}({})", countries.at(info[4]), biosVerP1, biosVerP2, manuDate)}; auto originModel{fmt::format("Console {}-{}", - fmt::join(info | take(9), ""), - fmt::join(info | drop(9) | take(5), ""))}; + fmt::join(info | take(8), ""), + fmt::join(info | drop(8) | take(6), ""))}; + // 19700101–123456 model.biosName = java::JNIString(android, biosModel); model.biosDetails = java::JNIString(android, originModel); diff --git a/app/src/main/java/emu/zenith/adapters/GenericListContainer.kt b/app/src/main/java/emu/zenith/adapters/GenericListContainer.kt index fd5c882..e1da2c3 100644 --- a/app/src/main/java/emu/zenith/adapters/GenericListContainer.kt +++ b/app/src/main/java/emu/zenith/adapters/GenericListContainer.kt @@ -18,4 +18,4 @@ abstract class GenericListContainer { abstract fun compareItem(prob: GenericListContainer): Boolean abstract fun isTheSame(prob: GenericListContainer): Boolean -} \ No newline at end of file +} diff --git a/app/src/main/java/emu/zenith/adapters/GenericViewAdapter.kt b/app/src/main/java/emu/zenith/adapters/GenericViewAdapter.kt index 2558ac7..231940c 100644 --- a/app/src/main/java/emu/zenith/adapters/GenericViewAdapter.kt +++ b/app/src/main/java/emu/zenith/adapters/GenericViewAdapter.kt @@ -14,7 +14,6 @@ class GenericViewHolder(view : T) : ViewHolder(view.root) { val binding = view } -@Suppress("LeakingThis") open class GenericViewAdapter : RecyclerView.Adapter>() { companion object { @@ -29,7 +28,6 @@ open class GenericViewAdapter private val asyncDiffer = AsyncListDiffer(this, viewDiffer) private val entities = mutableListOf>() - private val viewItems: List> get() = asyncDiffer.currentList private val factory = mutableMapOf() diff --git a/app/src/main/java/emu/zenith/helpers/views/KernelViewItem.kt b/app/src/main/java/emu/zenith/helpers/views/KernelViewItem.kt index 920c52c..6ec1112 100644 --- a/app/src/main/java/emu/zenith/helpers/views/KernelViewItem.kt +++ b/app/src/main/java/emu/zenith/helpers/views/KernelViewItem.kt @@ -31,10 +31,14 @@ class KernelViewItem( binding.kernelDetails.text = model.biosDetails val flag = when (model.biosName?.substringBefore(' ')) { - "Japan" -> "countries/jp.png" "USA" -> "countries/us.png" + "Japan" -> "countries/jp.png" + "Europe" -> "countries/eu.png" + "China" -> "countries/ch.png" + "Honk Kong" -> "countries/jp.png" else -> "" } + val bitmap = BitmapFactory.decodeStream(context.assets.open(flag)) binding.kernelFlag.setImageBitmap(bitmap) diff --git a/app/src/main/res/layout/kernel_item.xml b/app/src/main/res/layout/kernel_item.xml index 5709f0e..f8005ca 100644 --- a/app/src/main/res/layout/kernel_item.xml +++ b/app/src/main/res/layout/kernel_item.xml @@ -1,69 +1,76 @@ - + android:layout_height="wrap_content" + style="@style/Widget.Material3.CardView.Elevated" + android:layout_margin="4dp"> - - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - android:contentDescription="@string/kernel_item_flag_description" /> + - android:paddingStart="4dp" - android:paddingEnd="4dp" + + android:paddingStart="8dp" + android:paddingEnd="8dp" - - android:layout_margin="4dp" - android:paddingStart="4dp" - android:paddingEnd="4dp" + + android:layout_margin="4dp" + android:paddingStart="8dp" + android:paddingEnd="8dp" - - android:layout_margin="4dp" - android:paddingStart="4dp" - android:paddingEnd="4dp" + + android:layout_margin="4dp" + android:paddingStart="8dp" + android:paddingEnd="8dp" - - android:layout_margin="8dp" + + android:layout_margin="8dp" - \ No newline at end of file + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2339d22..6d98eba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -14,12 +14,12 @@ Core Kernel Selector - Open the Kernel file selection, eligible for the booting process + Open the kernel file selection, eligible for the booting process DSDB_ROOT_DIRECTORY Select 0000000000000.bin - USA v0.0(01/01/1970) + USA v00.00(01/01/1970) Console 19700101–123456 Kernel nationality diff --git a/gradle.properties b/gradle.properties index c95c245..2901cab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,24 +1,8 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn + android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": + kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library + android.nonTransitiveRClass=true org.gradle.unsafe.configuration-cache=true