Compare commits
7 Commits
android-25
...
android-25
Author | SHA1 | Date | |
---|---|---|---|
af787d680d | |||
c4a46402f0 | |||
a9b0e8f6d3 | |||
c792c0ec95 | |||
03025c3bff | |||
e2c44f34fc | |||
d525df98a0 |
@ -1,12 +1,11 @@
|
||||
| Pull Request | Commit | Title | Author | Merged? |
|
||||
|----|----|----|----|----|
|
||||
| [10529](https://github.com/yuzu-emu/yuzu//pull/10529) | [`368bf2211`](https://github.com/yuzu-emu/yuzu//pull/10529/files) | caches: make critical reclamation less eager and possible in more cases | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [12461](https://github.com/yuzu-emu/yuzu//pull/12461) | [`2831f5dc6`](https://github.com/yuzu-emu/yuzu//pull/12461/files) | Rework Nvdec and VIC to fix out-of-order videos, and speed up decoding. | [Kelebek1](https://github.com/Kelebek1/) | Yes |
|
||||
| [12749](https://github.com/yuzu-emu/yuzu//pull/12749) | [`aad4b0d6f`](https://github.com/yuzu-emu/yuzu//pull/12749/files) | general: workarounds for SMMU syncing issues | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [12982](https://github.com/yuzu-emu/yuzu//pull/12982) | [`ef5027712`](https://github.com/yuzu-emu/yuzu//pull/12982/files) | fs: Add FileSystemAccessor and use cmif serialization | [FearlessTobi](https://github.com/FearlessTobi/) | Yes |
|
||||
| [13000](https://github.com/yuzu-emu/yuzu//pull/13000) | [`461eaca7e`](https://github.com/yuzu-emu/yuzu//pull/13000/files) | device_memory_manager: skip unregistered interfaces on invalidate | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13075](https://github.com/yuzu-emu/yuzu//pull/13075) | [`f46dc3168`](https://github.com/yuzu-emu/yuzu//pull/13075/files) | shader_recompiler: throw on missing geometry streams in geometry shaders | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13096](https://github.com/yuzu-emu/yuzu//pull/13096) | [`0a8759057`](https://github.com/yuzu-emu/yuzu//pull/13096/files) | texture_cache: use two-pass collection for costly load resources | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13105](https://github.com/yuzu-emu/yuzu//pull/13105) | [`de5422b1f`](https://github.com/yuzu-emu/yuzu//pull/13105/files) | android: Misc controller fixes | [t895](https://github.com/t895/) | Yes |
|
||||
|
||||
|
||||
End of merge log. You can find the original README.md below the break.
|
||||
|
@ -64,17 +64,17 @@ data class PlayerInput(
|
||||
fun hasMapping(): Boolean {
|
||||
var hasMapping = false
|
||||
buttons.forEach {
|
||||
if (it != "[empty]" && it.isNotEmpty()) {
|
||||
if (it != "[empty]") {
|
||||
hasMapping = true
|
||||
}
|
||||
}
|
||||
analogs.forEach {
|
||||
if (it != "[empty]" && it.isNotEmpty()) {
|
||||
if (it != "[empty]") {
|
||||
hasMapping = true
|
||||
}
|
||||
}
|
||||
motions.forEach {
|
||||
if (it != "[empty]" && it.isNotEmpty()) {
|
||||
if (it != "[empty]") {
|
||||
hasMapping = true
|
||||
}
|
||||
}
|
||||
|
@ -780,7 +780,7 @@ class SettingsFragmentPresenter(
|
||||
playerIndex: Int,
|
||||
paramName: String,
|
||||
stick: NativeAnalog,
|
||||
defaultValue: Float
|
||||
defaultValue: Int
|
||||
): AbstractIntSetting =
|
||||
object : AbstractIntSetting {
|
||||
val params get() = NativeInput.getStickParam(playerIndex, stick)
|
||||
@ -788,7 +788,7 @@ class SettingsFragmentPresenter(
|
||||
override val key = ""
|
||||
|
||||
override fun getInt(needsGlobal: Boolean): Int =
|
||||
(params.get(paramName, defaultValue) * 100).toInt()
|
||||
(params.get(paramName, 0.15f) * 100).toInt()
|
||||
|
||||
override fun setInt(value: Int) {
|
||||
val tempParams = params
|
||||
@ -796,12 +796,12 @@ class SettingsFragmentPresenter(
|
||||
NativeInput.setStickParam(playerIndex, stick, tempParams)
|
||||
}
|
||||
|
||||
override val defaultValue = (defaultValue * 100).toInt()
|
||||
override val defaultValue = defaultValue
|
||||
|
||||
override fun getValueAsString(needsGlobal: Boolean): String =
|
||||
getInt(needsGlobal).toString()
|
||||
|
||||
override fun reset() = setInt(this.defaultValue)
|
||||
override fun reset() = setInt(defaultValue)
|
||||
}
|
||||
|
||||
private fun getExtraStickSettings(
|
||||
@ -811,11 +811,11 @@ class SettingsFragmentPresenter(
|
||||
val stickIsController =
|
||||
NativeInput.isController(NativeInput.getStickParam(playerIndex, nativeAnalog))
|
||||
val modifierRangeSetting =
|
||||
getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 0.5f)
|
||||
getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 50)
|
||||
val stickRangeSetting =
|
||||
getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 0.95f)
|
||||
getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 95)
|
||||
val stickDeadzoneSetting =
|
||||
getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 0.15f)
|
||||
getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 15)
|
||||
|
||||
val out = mutableListOf<SettingsItem>().apply {
|
||||
if (stickIsController) {
|
||||
|
@ -292,9 +292,6 @@ void EmulationSession::ShutdownEmulation() {
|
||||
// Unload user input.
|
||||
m_system.HIDCore().UnloadInputDevices();
|
||||
|
||||
// Enable all controllers
|
||||
m_system.HIDCore().SetSupportedStyleTag({Core::HID::NpadStyleSet::All});
|
||||
|
||||
// Shutdown the main emulated process
|
||||
if (m_load_result == Core::SystemResultStatus::Success) {
|
||||
m_system.DetachDebugger();
|
||||
|
@ -102,50 +102,8 @@ void ApplyControllerConfig(size_t player_index,
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<s32> GetSupportedStyles(int player_index) {
|
||||
auto& hid_core = EmulationSession::GetInstance().System().HIDCore();
|
||||
const auto npad_style_set = hid_core.GetSupportedStyleTag();
|
||||
std::vector<s32> supported_indexes;
|
||||
if (npad_style_set.fullkey == 1) {
|
||||
supported_indexes.push_back(static_cast<s32>(Core::HID::NpadStyleIndex::Fullkey));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_dual == 1) {
|
||||
supported_indexes.push_back(static_cast<s32>(Core::HID::NpadStyleIndex::JoyconDual));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_left == 1) {
|
||||
supported_indexes.push_back(static_cast<s32>(Core::HID::NpadStyleIndex::JoyconLeft));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_right == 1) {
|
||||
supported_indexes.push_back(static_cast<s32>(Core::HID::NpadStyleIndex::JoyconRight));
|
||||
}
|
||||
|
||||
if (player_index == 0 && npad_style_set.handheld == 1) {
|
||||
supported_indexes.push_back(static_cast<s32>(Core::HID::NpadStyleIndex::Handheld));
|
||||
}
|
||||
|
||||
if (npad_style_set.gamecube == 1) {
|
||||
supported_indexes.push_back(static_cast<s32>(Core::HID::NpadStyleIndex::GameCube));
|
||||
}
|
||||
|
||||
return supported_indexes;
|
||||
}
|
||||
|
||||
void ConnectController(size_t player_index, bool connected) {
|
||||
auto& hid_core = EmulationSession::GetInstance().System().HIDCore();
|
||||
ApplyControllerConfig(player_index, [&](Core::HID::EmulatedController* controller) {
|
||||
auto supported_styles = GetSupportedStyles(player_index);
|
||||
auto controller_style = controller->GetNpadStyleIndex(true);
|
||||
auto style = std::find(supported_styles.begin(), supported_styles.end(),
|
||||
static_cast<int>(controller_style));
|
||||
if (style == supported_styles.end() && !supported_styles.empty()) {
|
||||
controller->SetNpadStyleIndex(
|
||||
static_cast<Core::HID::NpadStyleIndex>(supported_styles[0]));
|
||||
}
|
||||
});
|
||||
|
||||
if (player_index == 0) {
|
||||
auto* handheld = hid_core.GetEmulatedController(Core::HID::NpadIdType::Handheld);
|
||||
auto* player_one = hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1);
|
||||
@ -564,10 +522,36 @@ jint Java_org_yuzu_yuzu_1emu_features_input_NativeInput_getButtonNameImpl(JNIEnv
|
||||
|
||||
jintArray Java_org_yuzu_yuzu_1emu_features_input_NativeInput_getSupportedStyleTagsImpl(
|
||||
JNIEnv* env, jobject j_obj, jint j_player_index) {
|
||||
auto supported_styles = GetSupportedStyles(j_player_index);
|
||||
jintArray j_supported_indexes = env->NewIntArray(supported_styles.size());
|
||||
env->SetIntArrayRegion(j_supported_indexes, 0, supported_styles.size(),
|
||||
supported_styles.data());
|
||||
auto& hid_core = EmulationSession::GetInstance().System().HIDCore();
|
||||
const auto npad_style_set = hid_core.GetSupportedStyleTag();
|
||||
std::vector<s32> supported_indexes;
|
||||
if (npad_style_set.fullkey == 1) {
|
||||
supported_indexes.push_back(static_cast<u32>(Core::HID::NpadStyleIndex::Fullkey));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_dual == 1) {
|
||||
supported_indexes.push_back(static_cast<u32>(Core::HID::NpadStyleIndex::JoyconDual));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_left == 1) {
|
||||
supported_indexes.push_back(static_cast<u32>(Core::HID::NpadStyleIndex::JoyconLeft));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_right == 1) {
|
||||
supported_indexes.push_back(static_cast<u32>(Core::HID::NpadStyleIndex::JoyconRight));
|
||||
}
|
||||
|
||||
if (j_player_index == 0 && npad_style_set.handheld == 1) {
|
||||
supported_indexes.push_back(static_cast<u32>(Core::HID::NpadStyleIndex::Handheld));
|
||||
}
|
||||
|
||||
if (npad_style_set.gamecube == 1) {
|
||||
supported_indexes.push_back(static_cast<u32>(Core::HID::NpadStyleIndex::GameCube));
|
||||
}
|
||||
|
||||
jintArray j_supported_indexes = env->NewIntArray(supported_indexes.size());
|
||||
env->SetIntArrayRegion(j_supported_indexes, 0, supported_indexes.size(),
|
||||
supported_indexes.data());
|
||||
return j_supported_indexes;
|
||||
}
|
||||
|
||||
|
@ -436,14 +436,14 @@ Result IApplicationManagerInterface::GetApplicationViewWithPromotionInfo(
|
||||
|
||||
Result IApplicationManagerInterface::GetApplicationRightsOnClient(
|
||||
OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
|
||||
u32 flags, u64 application_id, Uid account_id) {
|
||||
Common::UUID account_id, u32 flags, u64 application_id) {
|
||||
LOG_WARNING(Service_NS, "(STUBBED) called, flags={}, application_id={:016X}, account_id={}",
|
||||
flags, application_id, account_id.uuid.FormattedString());
|
||||
flags, application_id, account_id.FormattedString());
|
||||
|
||||
if (!out_rights.empty()) {
|
||||
ApplicationRightsOnClient rights{};
|
||||
rights.application_id = application_id;
|
||||
rights.uid = account_id.uuid;
|
||||
rights.uid = account_id;
|
||||
rights.flags = 0;
|
||||
rights.flags2 = 0;
|
||||
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
||||
Result GetApplicationRightsOnClient(
|
||||
OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
|
||||
u32 flags, u64 application_id, Uid account_id);
|
||||
Common::UUID account_id, u32 flags, u64 application_id);
|
||||
Result CheckSdCardMountStatus();
|
||||
Result GetSdCardMountStatusChangedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||
Result GetFreeSpaceSize(Out<s64> out_free_space_size, FileSys::StorageId storage_id);
|
||||
|
@ -108,9 +108,4 @@ struct ContentPath {
|
||||
};
|
||||
static_assert(sizeof(ContentPath) == 0x10, "ContentPath has incorrect size.");
|
||||
|
||||
struct Uid {
|
||||
alignas(8) Common::UUID uuid;
|
||||
};
|
||||
static_assert(sizeof(Uid) == 0x10, "Uid has incorrect size.");
|
||||
|
||||
} // namespace Service::NS
|
||||
|
@ -41,7 +41,8 @@ IQueryService::IQueryService(Core::System& system_) : ServiceFramework{system_,
|
||||
IQueryService::~IQueryService() = default;
|
||||
|
||||
Result IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId(
|
||||
Out<PlayStatistics> out_play_statistics, bool unknown, u64 application_id, Uid account_id) {
|
||||
Out<PlayStatistics> out_play_statistics, bool unknown, Common::UUID account_id,
|
||||
u64 application_id) {
|
||||
// TODO(German77): Read statistics of the game
|
||||
*out_play_statistics = {
|
||||
.application_id = application_id,
|
||||
@ -49,7 +50,7 @@ Result IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId(
|
||||
};
|
||||
|
||||
LOG_WARNING(Service_NS, "(STUBBED) called. unknown={}. application_id={:016X}, account_id={}",
|
||||
unknown, application_id, account_id.uuid.FormattedString());
|
||||
unknown, application_id, account_id.FormattedString());
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "common/uuid.h"
|
||||
#include "core/hle/service/cmif_types.h"
|
||||
#include "core/hle/service/ns/ns_types.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::NS {
|
||||
@ -30,7 +29,8 @@ public:
|
||||
|
||||
private:
|
||||
Result QueryPlayStatisticsByApplicationIdAndUserAccountId(
|
||||
Out<PlayStatistics> out_play_statistics, bool unknown, u64 application_id, Uid account_id);
|
||||
Out<PlayStatistics> out_play_statistics, bool unknown, Common::UUID account_id,
|
||||
u64 application_id);
|
||||
};
|
||||
|
||||
} // namespace Service::NS
|
||||
|
@ -72,19 +72,12 @@ TextureCache<P>::TextureCache(Runtime& runtime_, Tegra::MaxwellDeviceMemoryManag
|
||||
|
||||
template <class P>
|
||||
void TextureCache<P>::RunGarbageCollector() {
|
||||
bool high_priority_mode = false;
|
||||
bool aggressive_mode = false;
|
||||
u64 ticks_to_destroy = 0;
|
||||
size_t num_iterations = 0;
|
||||
|
||||
const auto Configure = [&](bool allow_aggressive) {
|
||||
high_priority_mode = total_used_memory >= expected_memory;
|
||||
aggressive_mode = allow_aggressive && total_used_memory >= critical_memory;
|
||||
ticks_to_destroy = aggressive_mode ? 10ULL : high_priority_mode ? 25ULL : 50ULL;
|
||||
num_iterations = aggressive_mode ? 40 : (high_priority_mode ? 20 : 10);
|
||||
};
|
||||
const auto Cleanup = [this, &num_iterations, &high_priority_mode,
|
||||
&aggressive_mode](ImageId image_id) {
|
||||
bool high_priority_mode = total_used_memory >= expected_memory;
|
||||
bool aggressive_mode = total_used_memory >= critical_memory;
|
||||
const u64 ticks_to_destroy = aggressive_mode ? 10ULL : high_priority_mode ? 25ULL : 50ULL;
|
||||
size_t num_iterations = aggressive_mode ? 40 : (high_priority_mode ? 20 : 10);
|
||||
const auto clean_up = [this, &num_iterations, &high_priority_mode,
|
||||
&aggressive_mode](ImageId image_id) {
|
||||
if (num_iterations == 0) {
|
||||
return true;
|
||||
}
|
||||
@ -130,16 +123,7 @@ void TextureCache<P>::RunGarbageCollector() {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// Try to remove anything old enough and not high priority.
|
||||
Configure(false);
|
||||
lru_cache.ForEachItemBelow(frame_tick - ticks_to_destroy, Cleanup);
|
||||
|
||||
// If pressure is still too high, prune aggressively.
|
||||
if (total_used_memory >= critical_memory) {
|
||||
Configure(true);
|
||||
lru_cache.ForEachItemBelow(frame_tick - ticks_to_destroy, Cleanup);
|
||||
}
|
||||
lru_cache.ForEachItemBelow(frame_tick - ticks_to_destroy, clean_up);
|
||||
}
|
||||
|
||||
template <class P>
|
||||
|
Reference in New Issue
Block a user