Compare commits

..

12 Commits

Author SHA1 Message Date
712d7604cd Android 210 2024-01-25 19:25:22 +00:00
5994e45f3f Merge yuzu-emu#12777 2024-01-25 19:25:22 +00:00
7701c91e79 Merge yuzu-emu#12769 2024-01-25 19:25:22 +00:00
2a00de23e8 Merge yuzu-emu#12759 2024-01-25 19:25:22 +00:00
3e5078f409 Merge yuzu-emu#12749 2024-01-25 19:25:22 +00:00
6e67b25af9 Merge pull request #12787 from t895/game-list-refresh
android: Only compare game contents for GameAdapter
2024-01-25 14:19:32 -05:00
e91667ba75 Merge pull request #12786 from t895/driver-overlay
android: Show driver vendor in FPS overlay
2024-01-25 14:19:25 -05:00
d45561ace0 Merge pull request #12499 from Kelebek1/time
Rework time services
2024-01-25 14:19:01 -05:00
0fdd6e8934 android: Fix waiting for driver install on startup 2024-01-25 13:04:04 -05:00
35794f4f18 android: Add current driver vendor to FPS overlay 2024-01-25 13:04:03 -05:00
7b01454d5f android: Only compare game contents for GameAdapter 2024-01-25 08:04:59 -05:00
e4915fb7d2 Rework time service to fix time passing offline. 2024-01-24 04:26:55 +00:00
10 changed files with 11 additions and 91 deletions

View File

@ -1,12 +1,9 @@
| Pull Request | Commit | Title | Author | Merged? |
|----|----|----|----|----|
| [12499](https://github.com/yuzu-emu/yuzu-android//pull/12499) | [`e4915fb7d`](https://github.com/yuzu-emu/yuzu-android//pull/12499/files) | Rework time services | [Kelebek1](https://github.com/Kelebek1/) | Yes |
| [12749](https://github.com/yuzu-emu/yuzu-android//pull/12749) | [`e3171486d`](https://github.com/yuzu-emu/yuzu-android//pull/12749/files) | general: workarounds for SMMU syncing issues | [liamwhite](https://github.com/liamwhite/) | Yes |
| [12759](https://github.com/yuzu-emu/yuzu-android//pull/12759) | [`a120f8ff4`](https://github.com/yuzu-emu/yuzu-android//pull/12759/files) | core: miscellaneous fixes | [liamwhite](https://github.com/liamwhite/) | Yes |
| [12769](https://github.com/yuzu-emu/yuzu-android//pull/12769) | [`ad4622da2`](https://github.com/yuzu-emu/yuzu-android//pull/12769/files) | core: hid: Reduce controller requests | [german77](https://github.com/german77/) | Yes |
| [12777](https://github.com/yuzu-emu/yuzu-android//pull/12777) | [`fb8c0f85f`](https://github.com/yuzu-emu/yuzu-android//pull/12777/files) | android: Add firmware decryption warning | [t895](https://github.com/t895/) | Yes |
| [12786](https://github.com/yuzu-emu/yuzu-android//pull/12786) | [`5a4dd4ba8`](https://github.com/yuzu-emu/yuzu-android//pull/12786/files) | android: Show driver vendor in FPS overlay | [t895](https://github.com/t895/) | Yes |
| [12787](https://github.com/yuzu-emu/yuzu-android//pull/12787) | [`7b01454d5`](https://github.com/yuzu-emu/yuzu-android//pull/12787/files) | android: Only compare game contents for GameAdapter | [t895](https://github.com/t895/) | Yes |
| [12777](https://github.com/yuzu-emu/yuzu-android//pull/12777) | [`b8be8dff6`](https://github.com/yuzu-emu/yuzu-android//pull/12777/files) | android: Add key warning | [t895](https://github.com/t895/) | Yes |
End of merge log. You can find the original README.md below the break.

View File

@ -624,11 +624,6 @@ object NativeLibrary {
*/
external fun areKeysPresent(): Boolean
/**
* Check if the system firmware can be decrypted by checking the Mii model system archive
*/
external fun canDecryptSystemArchive(): Boolean
/**
* Button type for use in onTouchEvent
*/

View File

@ -494,12 +494,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
val gpuDriver = NativeLibrary.getGpuDriver()
if (_binding != null) {
binding.showFpsText.text =
String.format(
"FPS: %.1f\n%s - %s",
perfStats[FPS],
cpuBackend,
gpuDriver
)
String.format("FPS: %.1f\n%s/%s", perfStats[FPS], cpuBackend, gpuDriver)
}
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
}

View File

@ -31,6 +31,7 @@ import androidx.preference.PreferenceManager
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
import com.google.android.material.transition.MaterialFadeThrough
import kotlinx.coroutines.launch
import org.yuzu.yuzu_emu.NativeLibrary
import java.io.File
import org.yuzu.yuzu_emu.R
import org.yuzu.yuzu_emu.YuzuApplication
@ -162,7 +163,7 @@ class SetupFragment : Fragment() {
R.string.install_prod_keys_warning_help,
{
val file = File(DirectoryInitialization.userDirectory + "/keys/prod.keys")
if (file.exists()) {
if (file.exists() && NativeLibrary.areKeysPresent()) {
StepState.COMPLETE
} else {
StepState.INCOMPLETE
@ -347,7 +348,8 @@ class SetupFragment : Fragment() {
val getProdKey =
registerForActivityResult(ActivityResultContracts.OpenDocument()) { result ->
if (result != null) {
if (mainActivity.processKey(result)) {
mainActivity.processKey(result)
if (NativeLibrary.areKeysPresent()) {
keyCallback.onStepCompleted()
}
}

View File

@ -34,9 +34,6 @@ class HomeViewModel : ViewModel() {
private val _checkKeys = MutableStateFlow(false)
val checkKeys = _checkKeys.asStateFlow()
private val _checkDecryption = MutableStateFlow(false)
val checkDecryption = _checkDecryption.asStateFlow()
var navigatedToSetup = false
fun setNavigationVisibility(visible: Boolean, animated: Boolean) {
@ -76,8 +73,4 @@ class HomeViewModel : ViewModel() {
fun setCheckKeys(value: Boolean) {
_checkKeys.value = value
}
fun setCheckDecryption(value: Boolean) {
_checkDecryption.value = value
}
}

View File

@ -82,7 +82,11 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
checkedDecryption = savedInstanceState.getBoolean(CHECKED_DECRYPTION)
}
if (!checkedDecryption) {
checkKeys()
val firstTimeSetup = PreferenceManager.getDefaultSharedPreferences(applicationContext)
.getBoolean(Settings.PREF_FIRST_APP_LAUNCH, true)
if (!firstTimeSetup) {
checkKeys()
}
checkedDecryption = true
}
@ -171,16 +175,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
}
}
}
launch {
repeatOnLifecycle(Lifecycle.State.CREATED) {
homeViewModel.checkDecryption.collect {
if (it) {
checkDecryption()
homeViewModel.setCheckDecryption(false)
}
}
}
}
}
// Dismiss previous notifications (should not happen unless a crash occurred)
@ -194,20 +188,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
MessageDialogFragment.newInstance(
titleId = R.string.keys_missing,
descriptionId = R.string.keys_missing_description,
helpLinkId = R.string.keys_missing_help,
dismissible = false,
positiveAction = { homeViewModel.setCheckDecryption(true) }
).show(supportFragmentManager, MessageDialogFragment.TAG)
} else {
checkDecryption()
}
}
private fun checkDecryption() {
if (!NativeLibrary.canDecryptSystemArchive()) {
MessageDialogFragment.newInstance(
titleId = R.string.decryption_failed,
descriptionId = R.string.decryption_failed_description,
helpLinkId = R.string.keys_missing_help
).show(supportFragmentManager, MessageDialogFragment.TAG)
}

View File

@ -925,10 +925,4 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_areKeysPresent(JNIEnv* env, jobje
return ContentManager::AreKeysPresent();
}
jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_canDecryptSystemArchive(JNIEnv* env, jobject jobj) {
auto& system = EmulationSession::GetInstance().System();
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
return ContentManager::CanDecryptSystemArchive(EmulationSession::GetInstance().System());
}
} // extern "C"

View File

@ -147,8 +147,6 @@
<string name="keys_missing">Encryption keys are missing</string>
<string name="keys_missing_description">Firmware and retail games cannot be decrypted</string>
<string name="keys_missing_help">https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys</string>
<string name="decryption_failed">System archive decryption failed</string>
<string name="decryption_failed_description">Encryption keys failed to decrypt firmware</string>
<!-- Applet launcher strings -->
<string name="applets">Applet launcher</string>

View File

@ -368,30 +368,6 @@ inline GameVerificationResult VerifyGameContents(
return GameVerificationResult::Success;
}
/**
* \brief Check if the system firmware can be decrypted by checking the Mii model system archive
* \param system Reference to the system instance
* \return Whether we were able to decrypt the RomFS of the Mii model. Used to see if we can decrypt
* firmware.
*/
inline bool CanDecryptSystemArchive(Core::System& system) {
constexpr u64 MiiModelId = 0x0100000000000802;
const auto bis_system = system.GetFileSystemController().GetSystemNANDContents();
if (!bis_system) {
// Not having system BIS files is not an error.
return true;
}
const auto mii_nca = bis_system->GetEntry(MiiModelId, FileSys::ContentRecordType::Data);
if (!mii_nca) {
// We can't get system entries without keys.
return false;
}
// Return whether we are able to decrypt the RomFS of the Mii model.
return mii_nca->GetRomFS().get() != nullptr;
}
/**
* Checks if the keys required for decrypting firmware and games are available
*/

View File

@ -4558,16 +4558,6 @@ void GMainWindow::OnCheckFirmwareDecryption() {
"quickstart guide</a> to get all your keys, firmware and "
"games."));
}
if (!ContentManager::CanDecryptSystemArchive(*system)) {
LOG_WARNING(Frontend, "Mii model decryption failed");
QMessageBox::warning(
this, tr("System Archive Decryption Failed"),
tr("Encryption keys failed to decrypt firmware. "
"<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu "
"quickstart guide</a> to get all your keys, firmware and "
"games."));
}
SetFirmwareVersion();
UpdateMenuState();
}