mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-11-28 18:08:25 -05:00
early-access version 4079
This commit is contained in:
parent
5ebb2d002d
commit
0a67b1a42b
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 4078.
|
This is the source code for early-access 4079.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -422,8 +422,6 @@ struct Values {
|
|||||||
false, true, &custom_rtc_enabled};
|
false, true, &custom_rtc_enabled};
|
||||||
SwitchableSetting<s64, false> custom_rtc_offset{
|
SwitchableSetting<s64, false> custom_rtc_offset{
|
||||||
linkage, 0, "custom_rtc_offset", Category::System, Specialization::Countable, true, true};
|
linkage, 0, "custom_rtc_offset", Category::System, Specialization::Countable, true, true};
|
||||||
// Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
|
|
||||||
s64 custom_rtc_differential;
|
|
||||||
SwitchableSetting<bool> rng_seed_enabled{
|
SwitchableSetting<bool> rng_seed_enabled{
|
||||||
linkage, false, "rng_seed_enabled", Category::System, Specialization::Paired, true, true};
|
linkage, false, "rng_seed_enabled", Category::System, Specialization::Paired, true, true};
|
||||||
SwitchableSetting<u32> rng_seed{
|
SwitchableSetting<u32> rng_seed{
|
||||||
|
@ -533,7 +533,7 @@ void IHidSystemServer::EnableAppletToGetInput(HLERequestContext& ctx) {
|
|||||||
parameters.is_enabled, parameters.applet_resource_user_id);
|
parameters.is_enabled, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
GetResourceManager()->EnableInput(parameters.applet_resource_user_id, parameters.is_enabled);
|
GetResourceManager()->EnableInput(parameters.applet_resource_user_id, parameters.is_enabled);
|
||||||
// GetResourceManager()->GetNpad()->EnableInput(parameters.applet_resource_user_id);
|
GetResourceManager()->GetNpad()->EnableAppletToGetInput(parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
@ -596,7 +596,7 @@ void IHidSystemServer::EnableAppletToGetPadInput(HLERequestContext& ctx) {
|
|||||||
parameters.is_enabled, parameters.applet_resource_user_id);
|
parameters.is_enabled, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
GetResourceManager()->EnablePadInput(parameters.applet_resource_user_id, parameters.is_enabled);
|
GetResourceManager()->EnablePadInput(parameters.applet_resource_user_id, parameters.is_enabled);
|
||||||
// GetResourceManager()->GetNpad()->EnableInput(parameters.applet_resource_user_id);
|
GetResourceManager()->GetNpad()->EnableAppletToGetInput(parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
@ -1240,12 +1240,17 @@ bool EmulatedController::SetVibration(DeviceIndex device_index, const VibrationV
|
|||||||
if (!output_devices[index]) {
|
if (!output_devices[index]) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
last_vibration_value = vibration;
|
||||||
|
|
||||||
|
if (!Settings::values.vibration_enabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
||||||
const auto& player = Settings::values.players.GetValue()[player_index];
|
const auto& player = Settings::values.players.GetValue()[player_index];
|
||||||
const f32 strength = static_cast<f32>(player.vibration_strength) / 100.0f;
|
const f32 strength = static_cast<f32>(player.vibration_strength) / 100.0f;
|
||||||
|
|
||||||
last_vibration_value = vibration;
|
|
||||||
|
|
||||||
if (!player.vibration_enabled) {
|
if (!player.vibration_enabled) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -480,6 +480,10 @@ void NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!data->flag.enable_pad_input) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
RequestPadStateUpdate(aruid, controller.device->GetNpadIdType());
|
RequestPadStateUpdate(aruid, controller.device->GetNpadIdType());
|
||||||
auto& pad_state = controller.npad_pad_state;
|
auto& pad_state = controller.npad_pad_state;
|
||||||
auto& libnx_state = controller.npad_libnx_state;
|
auto& libnx_state = controller.npad_libnx_state;
|
||||||
@ -1316,4 +1320,13 @@ void NPad::UpdateHandheldAbstractState() {
|
|||||||
abstracted_pads[NpadIdTypeToIndex(Core::HID::NpadIdType::Handheld)].Update();
|
abstracted_pads[NpadIdTypeToIndex(Core::HID::NpadIdType::Handheld)].Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NPad::EnableAppletToGetInput(u64 aruid) {
|
||||||
|
std::scoped_lock lock{mutex};
|
||||||
|
std::scoped_lock shared_lock{*applet_resource_holder.shared_mutex};
|
||||||
|
|
||||||
|
for (auto& abstract_pad : abstracted_pads) {
|
||||||
|
abstract_pad.EnableAppletToGetInput(aruid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::HID
|
||||||
|
@ -153,6 +153,8 @@ public:
|
|||||||
|
|
||||||
void UpdateHandheldAbstractState();
|
void UpdateHandheldAbstractState();
|
||||||
|
|
||||||
|
void EnableAppletToGetInput(u64 aruid);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct NpadControllerData {
|
struct NpadControllerData {
|
||||||
NpadInternalState* shared_memory = nullptr;
|
NpadInternalState* shared_memory = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user