forked from etc/pineapple-src
early-access version 4124
This commit is contained in:
parent
3308f3bac8
commit
5a87b5c400
9 changed files with 28 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 4123.
|
||||
This is the source code for early-access 4124.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
|
@ -259,13 +259,20 @@ fun runGitCommand(command: List<String>): String {
|
|||
}
|
||||
|
||||
fun getGitVersion(): String {
|
||||
val gitVersion = runGitCommand(listOf("git", "describe", "--always", "--long"))
|
||||
val gitVersion = runGitCommand(
|
||||
listOf(
|
||||
"git",
|
||||
"describe",
|
||||
"--always",
|
||||
"--long"
|
||||
)
|
||||
).replace(Regex("(-0)?-[^-]+$"), "")
|
||||
val versionName = if (System.getenv("GITHUB_ACTIONS") != null) {
|
||||
System.getenv("GIT_TAG_NAME") ?: gitVersion
|
||||
} else {
|
||||
gitVersion
|
||||
}
|
||||
return versionName.replace(Regex("(-0)?-[^-]+$"), "").ifEmpty { "0.0" }
|
||||
return versionName.ifEmpty { "0.0" }
|
||||
}
|
||||
|
||||
fun getGitHash(): String =
|
||||
|
|
|
@ -270,7 +270,7 @@ class OutLargeData {
|
|||
public:
|
||||
static_assert(std::is_trivially_copyable_v<T>, "LargeData type must be trivially copyable");
|
||||
static_assert((A & BufferAttr_In) == 0, "OutLargeData attr must not be In");
|
||||
static constexpr BufferAttr Attr = static_cast<BufferAttr>(A | BufferAttr_In | BufferAttr_FixedSize);
|
||||
static constexpr BufferAttr Attr = static_cast<BufferAttr>(A | BufferAttr_Out | BufferAttr_FixedSize);
|
||||
using Type = T;
|
||||
|
||||
/* implicit */ OutLargeData(const OutLargeData& t) : raw(t.raw) {}
|
||||
|
|
|
@ -508,13 +508,8 @@ void IHidSystemServer::RegisterAppletResourceUserId(HLERequestContext& ctx) {
|
|||
Result result = GetResourceManager()->RegisterAppletResourceUserId(
|
||||
parameters.applet_resource_user_id, parameters.enable_input);
|
||||
|
||||
if (result.IsSuccess()) {
|
||||
// result = GetResourceManager()->GetNpad()->RegisterAppletResourceUserId(
|
||||
// parameters.applet_resource_user_id);
|
||||
}
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push(result);
|
||||
}
|
||||
|
||||
void IHidSystemServer::UnregisterAppletResourceUserId(HLERequestContext& ctx) {
|
||||
|
@ -524,8 +519,6 @@ void IHidSystemServer::UnregisterAppletResourceUserId(HLERequestContext& ctx) {
|
|||
LOG_INFO(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||
|
||||
GetResourceManager()->UnregisterAppletResourceUserId(applet_resource_user_id);
|
||||
// GetResourceManager()->GetNpad()->UnregisterAppletResourceUserId(applet_resource_user_id);
|
||||
// GetResourceManager()->GetPalma()->UnregisterAppletResourceUserId(applet_resource_user_id);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
|
|
|
@ -314,6 +314,7 @@ void ResourceManager::UnregisterAppletResourceUserId(u64 aruid) {
|
|||
std::scoped_lock lock{shared_mutex};
|
||||
applet_resource->UnregisterAppletResourceUserId(aruid);
|
||||
npad->UnregisterAppletResourceUserId(aruid);
|
||||
// palma->UnregisterAppletResourceUserId(aruid);
|
||||
}
|
||||
|
||||
Result ResourceManager::GetSharedMemoryHandle(Kernel::KSharedMemory** out_handle, u64 aruid) {
|
||||
|
@ -324,6 +325,7 @@ Result ResourceManager::GetSharedMemoryHandle(Kernel::KSharedMemory** out_handle
|
|||
void ResourceManager::FreeAppletResourceId(u64 aruid) {
|
||||
std::scoped_lock lock{shared_mutex};
|
||||
applet_resource->FreeAppletResourceId(aruid);
|
||||
npad->FreeAppletResourceId(aruid);
|
||||
}
|
||||
|
||||
void ResourceManager::EnableInput(u64 aruid, bool is_enabled) {
|
||||
|
|
|
@ -117,6 +117,10 @@ Result NPad::ActivateNpadResource(u64 aruid) {
|
|||
return npad_resource.Activate(aruid);
|
||||
}
|
||||
|
||||
void NPad::FreeAppletResourceId(u64 aruid) {
|
||||
return npad_resource.FreeAppletResourceId(aruid);
|
||||
}
|
||||
|
||||
void NPad::ControllerUpdate(Core::HID::ControllerTriggerType type, std::size_t controller_idx) {
|
||||
if (type == Core::HID::ControllerTriggerType::All) {
|
||||
ControllerUpdate(Core::HID::ControllerTriggerType::Connected, controller_idx);
|
||||
|
|
|
@ -58,6 +58,8 @@ public:
|
|||
Result ActivateNpadResource();
|
||||
Result ActivateNpadResource(u64 aruid);
|
||||
|
||||
void FreeAppletResourceId(u64 aruid);
|
||||
|
||||
// When the controller is requesting an update for the shared memory
|
||||
void OnUpdate(const Core::Timing::CoreTiming& core_timing);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ Result NPadResource::RegisterAppletResourceUserId(u64 aruid) {
|
|||
void NPadResource::UnregisterAppletResourceUserId(u64 aruid) {
|
||||
const u64 aruid_index = GetIndexFromAruid(aruid);
|
||||
|
||||
DestroyStyleSetUpdateEvents(aruid);
|
||||
FreeAppletResourceId(aruid);
|
||||
if (aruid_index < AruidIndexMax) {
|
||||
state[aruid_index] = {};
|
||||
registration_list.flag[aruid_index] = RegistrationStatus::PendingDelete;
|
||||
|
@ -80,14 +80,18 @@ void NPadResource::UnregisterAppletResourceUserId(u64 aruid) {
|
|||
}
|
||||
}
|
||||
|
||||
void NPadResource::DestroyStyleSetUpdateEvents(u64 aruid) {
|
||||
void NPadResource::FreeAppletResourceId(u64 aruid) {
|
||||
const u64 aruid_index = GetIndexFromAruid(aruid);
|
||||
|
||||
if (aruid_index >= AruidIndexMax) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto& controller_state : state[aruid_index].controller_state) {
|
||||
auto& aruid_data = state[aruid_index];
|
||||
|
||||
aruid_data.flag.is_assigned.Assign(false);
|
||||
|
||||
for (auto& controller_state : aruid_data.controller_state) {
|
||||
if (!controller_state.is_styleset_update_event_initialized) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
Result RegisterAppletResourceUserId(u64 aruid);
|
||||
void UnregisterAppletResourceUserId(u64 aruid);
|
||||
|
||||
void DestroyStyleSetUpdateEvents(u64 aruid);
|
||||
void FreeAppletResourceId(u64 aruid);
|
||||
|
||||
Result Activate(u64 aruid);
|
||||
Result Activate();
|
||||
|
|
Loading…
Reference in a new issue