early-access version 3875
This commit is contained in:
parent
873a74b74f
commit
0aafabe39c
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3874.
|
This is the source code for early-access 3875.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -5,6 +5,9 @@ package org.yuzu.yuzu_emu.fragments
|
|||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
@ -21,22 +24,40 @@ import org.yuzu.yuzu_emu.model.TaskViewModel
|
|||||||
class IndeterminateProgressDialogFragment : DialogFragment() {
|
class IndeterminateProgressDialogFragment : DialogFragment() {
|
||||||
private val taskViewModel: TaskViewModel by activityViewModels()
|
private val taskViewModel: TaskViewModel by activityViewModels()
|
||||||
|
|
||||||
|
private lateinit var binding: DialogProgressBarBinding
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val titleId = requireArguments().getInt(TITLE)
|
val titleId = requireArguments().getInt(TITLE)
|
||||||
|
|
||||||
val progressBinding = DialogProgressBarBinding.inflate(layoutInflater)
|
binding = DialogProgressBarBinding.inflate(layoutInflater)
|
||||||
progressBinding.progressBar.isIndeterminate = true
|
binding.progressBar.isIndeterminate = true
|
||||||
val dialog = MaterialAlertDialogBuilder(requireContext())
|
val dialog = MaterialAlertDialogBuilder(requireContext())
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setView(progressBinding.root)
|
.setView(binding.root)
|
||||||
.create()
|
.create()
|
||||||
dialog.setCanceledOnTouchOutside(false)
|
dialog.setCanceledOnTouchOutside(false)
|
||||||
|
|
||||||
|
if (!taskViewModel.isRunning.value) {
|
||||||
|
taskViewModel.runTask()
|
||||||
|
}
|
||||||
|
return dialog
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
viewLifecycleOwner.lifecycleScope.launch {
|
viewLifecycleOwner.lifecycleScope.launch {
|
||||||
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
||||||
taskViewModel.isComplete.collect {
|
taskViewModel.isComplete.collect {
|
||||||
if (it) {
|
if (it) {
|
||||||
dialog.dismiss()
|
dismiss()
|
||||||
when (val result = taskViewModel.result.value) {
|
when (val result = taskViewModel.result.value) {
|
||||||
is String -> Toast.makeText(requireContext(), result, Toast.LENGTH_LONG)
|
is String -> Toast.makeText(requireContext(), result, Toast.LENGTH_LONG)
|
||||||
.show()
|
.show()
|
||||||
@ -51,11 +72,6 @@ class IndeterminateProgressDialogFragment : DialogFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!taskViewModel.isRunning.value) {
|
|
||||||
taskViewModel.runTask()
|
|
||||||
}
|
|
||||||
return dialog
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -27,12 +27,12 @@ u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
|||||||
|
|
||||||
u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
||||||
const AdpcmDataSourceVersion1Command& command) const {
|
const AdpcmDataSourceVersion1Command& command) const {
|
||||||
return static_cast<u32>(command.pitch * 0.25f * 1.2f);
|
return static_cast<u32>(command.pitch * 0.46f * 1.2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
||||||
const AdpcmDataSourceVersion2Command& command) const {
|
const AdpcmDataSourceVersion2Command& command) const {
|
||||||
return static_cast<u32>(command.pitch * 0.25f * 1.2f);
|
return static_cast<u32>(command.pitch * 0.46f * 1.2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
u32 CommandProcessingTimeEstimatorVersion1::Estimate(
|
||||||
|
@ -684,11 +684,11 @@ u64 System::GenerateCommand(std::span<u8> in_command_buffer,
|
|||||||
sink_context, splitter_context, perf_manager};
|
sink_context, splitter_context, perf_manager};
|
||||||
|
|
||||||
voice_context.SortInfo();
|
voice_context.SortInfo();
|
||||||
|
command_generator.GenerateVoiceCommands();
|
||||||
|
|
||||||
const auto start_estimated_time{drop_voice_param *
|
const auto start_estimated_time{drop_voice_param *
|
||||||
static_cast<f32>(command_buffer.estimated_process_time)};
|
static_cast<f32>(command_buffer.estimated_process_time)};
|
||||||
|
|
||||||
command_generator.GenerateVoiceCommands();
|
|
||||||
command_generator.GenerateSubMixCommands();
|
command_generator.GenerateSubMixCommands();
|
||||||
command_generator.GenerateFinalMixCommands();
|
command_generator.GenerateFinalMixCommands();
|
||||||
command_generator.GenerateSinkCommands();
|
command_generator.GenerateSinkCommands();
|
||||||
|
@ -752,8 +752,10 @@ bool RegisteredCache::RemoveExistingEntry(u64 title_id) const {
|
|||||||
for (u8 i = 0; i < 0x10; i++) {
|
for (u8 i = 0; i < 0x10; i++) {
|
||||||
const auto meta_dir = dir->CreateDirectoryRelative("yuzu_meta");
|
const auto meta_dir = dir->CreateDirectoryRelative("yuzu_meta");
|
||||||
const auto filename = GetCNMTName(TitleType::Update, title_id + i);
|
const auto filename = GetCNMTName(TitleType::Update, title_id + i);
|
||||||
|
if (meta_dir->GetFile(filename)) {
|
||||||
removed_data |= meta_dir->DeleteFile(filename);
|
removed_data |= meta_dir->DeleteFile(filename);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return removed_data;
|
return removed_data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user