Compare commits

..

24 commits

Author SHA1 Message Date
lizzie
8db6b82bdf fix dynarmic i hope 2026-03-07 18:34:19 +00:00
lizzie
f731f91175 fx 2026-03-07 18:34:19 +00:00
lizzie
b6b46bb657 fx 2026-03-07 18:34:19 +00:00
lizzie
761f20947b fix boost 2026-03-07 18:34:19 +00:00
lizzie
e4ae4b43bf fx 2026-03-07 18:34:19 +00:00
lizzie
c04aebe9a4 fix stuff 2026-03-07 18:34:19 +00:00
lizzie
e1801ab9f9 stupid macos 2026-03-07 18:34:19 +00:00
lizzie
8e0b550c68 fix1 2026-03-07 18:34:19 +00:00
lizzie
b79d4f80b3 fx 2026-03-07 18:34:19 +00:00
lizzie
63ba079494 fix spirv-tools 2026-03-07 18:34:19 +00:00
lizzie
d5d7587f5b fixes for ios spirv tools 2026-03-07 18:34:19 +00:00
lizzie
e4641ba887 fix license 2026-03-07 18:34:19 +00:00
lizzie
0e2133f5fb fix ffmpeg 2026-03-07 18:34:19 +00:00
lizzie
e9744b5520 fx 2026-03-07 18:34:19 +00:00
lizzie
ea4b24ee6b fx 2026-03-07 18:34:19 +00:00
lizzie
625395bfec license 2026-03-07 18:34:19 +00:00
lizzie
f8c6332ab5 ios toolchain cmake 2026-03-07 18:34:19 +00:00
lizzie
c0a947e90a license 2026-03-07 18:34:19 +00:00
lizzie
fce3bec917 license headers 2026-03-07 18:34:19 +00:00
lizzie
2c9d9788e3 flatten + cmake 2026-03-07 18:34:19 +00:00
lizzie
6883b30af8 flatten 2026-03-07 18:34:19 +00:00
lizzie
bfd09c4d8a loicense 2026-03-07 18:34:19 +00:00
lizzie
63ce379dd7 modernize #1 2026-03-07 18:34:19 +00:00
lizzie
fb69cb06d1 sudachi ios stuff 2026-03-07 18:34:19 +00:00
16 changed files with 53 additions and 110 deletions

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-FileCopyrightText: 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
package org.yuzu.yuzu_emu.fragments
@ -19,6 +19,7 @@ import androidx.navigation.findNavController
import androidx.navigation.fragment.navArgs
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.transition.MaterialSharedAxis
import kotlinx.coroutines.launch
import org.yuzu.yuzu_emu.R
import org.yuzu.yuzu_emu.adapters.AddonAdapter
import org.yuzu.yuzu_emu.databinding.FragmentAddonsBinding
@ -41,7 +42,7 @@ class AddonsFragment : Fragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
addonViewModel.onAddonsViewCreated(args.game)
addonViewModel.onOpenAddons(args.game)
enterTransition = MaterialSharedAxis(MaterialSharedAxis.X, true)
returnTransition = MaterialSharedAxis(MaterialSharedAxis.X, false)
reenterTransition = MaterialSharedAxis(MaterialSharedAxis.X, false)
@ -121,14 +122,12 @@ class AddonsFragment : Fragment() {
override fun onResume() {
super.onResume()
addonViewModel.onAddonsViewStarted(args.game)
addonViewModel.refreshAddons()
}
override fun onDestroy() {
if (activity?.isChangingConfigurations != true) {
addonViewModel.onCloseAddons()
}
super.onDestroy()
addonViewModel.onCloseAddons()
}
val installAddon =
@ -168,7 +167,7 @@ class AddonsFragment : Fragment() {
} catch (_: Exception) {
return@newInstance errorMessage
}
addonViewModel.refreshAddons(force = true)
addonViewModel.refreshAddons()
return@newInstance getString(R.string.addon_installed_successfully)
}.show(parentFragmentManager, ProgressDialogFragment.TAG)
} else {

View file

@ -18,7 +18,7 @@ import org.yuzu.yuzu_emu.utils.NativeConfig
import java.util.concurrent.atomic.AtomicBoolean
class AddonViewModel : ViewModel() {
private val _patchList = MutableStateFlow<List<Patch>>(emptyList())
private val _patchList = MutableStateFlow(mutableListOf<Patch>())
val addonList get() = _patchList.asStateFlow()
private val _showModInstallPicker = MutableStateFlow(false)
@ -31,62 +31,34 @@ class AddonViewModel : ViewModel() {
val addonToDelete = _addonToDelete.asStateFlow()
var game: Game? = null
private var loadedGameKey: String? = null
private val isRefreshing = AtomicBoolean(false)
private val pendingRefresh = AtomicBoolean(false)
fun onAddonsViewCreated(game: Game) {
fun onOpenAddons(game: Game) {
this.game = game
refreshAddons(commitEmpty = false)
refreshAddons()
}
fun onAddonsViewStarted(game: Game) {
this.game = game
val hasLoadedCurrentGame = loadedGameKey == gameKey(game)
refreshAddons(force = !hasLoadedCurrentGame)
}
fun refreshAddons(force: Boolean = false, commitEmpty: Boolean = true) {
val currentGame = game ?: return
val currentGameKey = gameKey(currentGame)
if (!force && loadedGameKey == currentGameKey) {
fun refreshAddons() {
if (isRefreshing.get() || game == null) {
return
}
if (!isRefreshing.compareAndSet(false, true)) {
if (force) {
pendingRefresh.set(true)
}
return
}
isRefreshing.set(true)
viewModelScope.launch {
try {
val patches = withContext(Dispatchers.IO) {
NativeLibrary.getPatchesForFile(currentGame.path, currentGame.programId)
} ?: return@launch
val patchList = patches.toMutableList()
withContext(Dispatchers.IO) {
val patchList = (
NativeLibrary.getPatchesForFile(game!!.path, game!!.programId)
?: emptyArray()
).toMutableList()
patchList.sortBy { it.name }
// Ensure only one update is enabled
ensureSingleUpdateEnabled(patchList)
removeDuplicates(patchList)
if (patchList.isEmpty() && !commitEmpty) {
return@launch
}
if (gameKey(game ?: return@launch) != currentGameKey) {
return@launch
}
_patchList.value = patchList.toList()
loadedGameKey = currentGameKey
} finally {
_patchList.value = patchList
isRefreshing.set(false)
if (pendingRefresh.compareAndSet(true, false)) {
refreshAddons(force = true)
}
}
}
}
@ -147,26 +119,17 @@ class AddonViewModel : ViewModel() {
PatchType.DLC -> NativeLibrary.removeDLC(patch.programId)
PatchType.Mod -> NativeLibrary.removeMod(patch.programId, patch.name)
}
refreshAddons(force = true)
refreshAddons()
}
fun onCloseAddons() {
val currentGame = game ?: run {
_patchList.value = emptyList()
loadedGameKey = null
return
}
val currentList = _patchList.value
if (currentList.isEmpty()) {
_patchList.value = emptyList()
loadedGameKey = null
game = null
if (_patchList.value.isEmpty()) {
return
}
NativeConfig.setDisabledAddons(
currentGame.programId,
currentList.mapNotNull {
game!!.programId,
_patchList.value.mapNotNull {
if (it.enabled) {
null
} else {
@ -185,8 +148,7 @@ class AddonViewModel : ViewModel() {
}.toTypedArray()
)
NativeConfig.saveGlobalConfig()
_patchList.value = emptyList()
loadedGameKey = null
_patchList.value.clear()
game = null
}
@ -197,8 +159,4 @@ class AddonViewModel : ViewModel() {
fun showModNoticeDialog(show: Boolean) {
_showModNoticeDialog.value = show
}
private fun gameKey(game: Game): String {
return "${game.programId}|${game.path}"
}
}

View file

@ -642,7 +642,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
}
}
addonViewModel.refreshAddons(force = true)
addonViewModel.refreshAddons()
val separator = System.lineSeparator() ?: "\n"
val installResult = StringBuilder()

View file

@ -706,7 +706,6 @@ struct Values {
Setting<bool> pause_tas_on_load{linkage, true, "pause_tas_on_load", Category::Controls};
Setting<bool> tas_enable{linkage, false, "tas_enable", Category::Controls};
Setting<bool> tas_loop{linkage, false, "tas_loop", Category::Controls};
Setting<bool> tas_show_recording_dialog{linkage, true, "tas_show_recording_dialog", Category::Controls};
Setting<bool> mouse_panning{
linkage, false, "mouse_panning", Category::Controls, Specialization::Default, false};

View file

@ -4,7 +4,7 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "dynarmic/interface/halt_reason.h"
#include <dynarmic/interface/halt_reason.h>
#include "core/arm/arm_interface.h"

View file

@ -6,8 +6,8 @@
#pragma once
#include "dynarmic/interface/A32/a32.h"
#include "dynarmic/interface/code_page.h"
#include <dynarmic/interface/A32/a32.h>
#include <dynarmic/interface/code_page.h>
#include "core/arm/arm_interface.h"
#include "core/arm/dynarmic/dynarmic_exclusive_monitor.h"

View file

@ -10,8 +10,8 @@
#include <memory>
#include <ankerl/unordered_dense.h>
#include "dynarmic/interface/A64/a64.h"
#include "dynarmic/interface/code_page.h"
#include <dynarmic/interface/A64/a64.h>
#include <dynarmic/interface/code_page.h>
#include "common/common_types.h"
#include "common/hash.h"
#include "core/arm/arm_interface.h"

View file

@ -5,7 +5,7 @@
#include <optional>
#include "dynarmic/interface/A32/coprocessor.h"
#include <dynarmic/interface/A32/coprocessor.h>
#include "common/common_types.h"
namespace Core {

View file

@ -3,7 +3,7 @@
#pragma once
#include "dynarmic/interface/exclusive_monitor.h"
#include <dynarmic/interface/exclusive_monitor.h>
#include "common/common_types.h"
#include "core/arm/exclusive_monitor.h"

View file

@ -7,9 +7,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#include "dynarmic/frontend/A64/a64_types.h"
#include "dynarmic/frontend/A64/decoder/a64.h"
#include "dynarmic/frontend/imm.h"
#include <dynarmic/frontend/A64/a64_types.h>
#include <dynarmic/frontend/A64/decoder/a64.h>
#include <dynarmic/frontend/imm.h>
#pragma GCC diagnostic pop

View file

@ -1,6 +1,3 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -21,14 +18,17 @@ namespace Service::Audio {
void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
server_manager->RegisterNamedService("audctl", std::make_shared<IAudioController>(system));
server_manager->RegisterNamedService("audin:u", std::make_shared<IAudioInManager>(system));
server_manager->RegisterNamedService("audout:u", std::make_shared<IAudioOutManager>(system));
// Depends on audout:u and audin:u on ctor!
server_manager->RegisterNamedService("audctl", std::make_shared<IAudioController>(system));
server_manager->RegisterNamedService("audrec:a", std::make_shared<IFinalOutputRecorderManagerForApplet>(system));
server_manager->RegisterNamedService("audrec:u", std::make_shared<IFinalOutputRecorderManager>(system));
server_manager->RegisterNamedService("audren:u", std::make_shared<IAudioRendererManager>(system));
server_manager->RegisterNamedService("hwopus", std::make_shared<IHardwareOpusDecoderManager>(system));
server_manager->RegisterNamedService(
"audrec:a", std::make_shared<IFinalOutputRecorderManagerForApplet>(system));
server_manager->RegisterNamedService("audrec:u",
std::make_shared<IFinalOutputRecorderManager>(system));
server_manager->RegisterNamedService("audren:u",
std::make_shared<IAudioRendererManager>(system));
server_manager->RegisterNamedService("hwopus",
std::make_shared<IHardwareOpusDecoderManager>(system));
ServerManager::RunServer(std::move(server_manager));
}

View file

@ -8,9 +8,9 @@
#include <map>
#include <span>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/interface/A64/a64.h"
#include "dynarmic/interface/A64/config.h"
#include "dynarmic/interface/code_page.h"
#include <dynarmic/interface/A64/a64.h>
#include <dynarmic/interface/A64/config.h>
#include <dynarmic/interface/code_page.h>
#include "common/alignment.h"
#include "common/common_funcs.h"

View file

@ -11,7 +11,7 @@
#include <cstring>
#include <boost/container/static_vector.hpp>
#include "dynarmic/common/spin_lock.h"
#include <dynarmic/common/spin_lock.h>
namespace Dynarmic {

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@ -35,7 +35,6 @@ void ConfigureTasDialog::LoadConfiguration() {
ui->tas_enable->setChecked(Settings::values.tas_enable.GetValue());
ui->tas_loop_script->setChecked(Settings::values.tas_loop.GetValue());
ui->tas_pause_on_load->setChecked(Settings::values.pause_tas_on_load.GetValue());
ui->tas_show_recording_dialog->setChecked(Settings::values.tas_show_recording_dialog.GetValue());
}
void ConfigureTasDialog::ApplyConfiguration() {
@ -43,7 +42,6 @@ void ConfigureTasDialog::ApplyConfiguration() {
Settings::values.tas_enable.SetValue(ui->tas_enable->isChecked());
Settings::values.tas_loop.SetValue(ui->tas_loop_script->isChecked());
Settings::values.pause_tas_on_load.SetValue(ui->tas_pause_on_load->isChecked());
Settings::values.tas_show_recording_dialog.SetValue(ui->tas_show_recording_dialog->isChecked());
}
void ConfigureTasDialog::SetDirectory(DirectoryTarget target, QLineEdit* edit) {

View file

@ -78,13 +78,6 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="4">
<widget class="QCheckBox" name="tas_show_recording_dialog">
<property name="text">
<string>Show recording dialog</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View file

@ -3665,17 +3665,13 @@ void MainWindow::OnTasRecord() {
const bool is_recording = input_subsystem->GetTas()->Record();
if (!is_recording) {
if (Settings::values.tas_show_recording_dialog.GetValue()) {
is_tas_recording_dialog_active = true;
is_tas_recording_dialog_active = true;
bool answer = question(this, tr("TAS Recording"), tr("Overwrite file of player 1?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
bool answer = question(this, tr("TAS Recording"), tr("Overwrite file of player 1?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
input_subsystem->GetTas()->SaveRecording(answer);
is_tas_recording_dialog_active = false;
} else {
input_subsystem->GetTas()->SaveRecording(true);
}
input_subsystem->GetTas()->SaveRecording(answer);
is_tas_recording_dialog_active = false;
}
OnTasStateChanged();
}