yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #165 from bunnei/puyo-fixes

Stubs for HID, AM, and a mutex fix
This commit is contained in:
bunnei 2018-02-05 20:14:40 -08:00 committed by GitHub
commit 1cd9438945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 2 deletions

View File

@ -70,6 +70,7 @@ ResultCode Mutex::Release(Thread* thread) {
holding_thread->held_mutexes.erase(this); holding_thread->held_mutexes.erase(this);
holding_thread->UpdatePriority(); holding_thread->UpdatePriority();
SetHoldingThread(nullptr); SetHoldingThread(nullptr);
SetHasWaiters(!GetWaitingThreads().empty());
WakeupAllWaitingThreads(); WakeupAllWaitingThreads();
Core::System::GetInstance().PrepareReschedule(); Core::System::GetInstance().PrepareReschedule();

View File

@ -270,6 +270,7 @@ private:
IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationFunctions") { IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationFunctions") {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{1, &IApplicationFunctions::PopLaunchParameter, "PopLaunchParameter"}, {1, &IApplicationFunctions::PopLaunchParameter, "PopLaunchParameter"},
{20, &IApplicationFunctions::EnsureSaveData, "EnsureSaveData"},
{21, &IApplicationFunctions::GetDesiredLanguage, "GetDesiredLanguage"}, {21, &IApplicationFunctions::GetDesiredLanguage, "GetDesiredLanguage"},
{22, &IApplicationFunctions::SetTerminateResult, "SetTerminateResult"}, {22, &IApplicationFunctions::SetTerminateResult, "SetTerminateResult"},
{66, &IApplicationFunctions::InitializeGamePlayRecording, "InitializeGamePlayRecording"}, {66, &IApplicationFunctions::InitializeGamePlayRecording, "InitializeGamePlayRecording"},
@ -299,6 +300,12 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called"); LOG_DEBUG(Service_AM, "called");
} }
void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
}
void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) { void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) {
// Takes an input u32 Result, no output. // Takes an input u32 Result, no output.
// For example, in some cases official apps use this with error 0x2A2 then uses svcBreak. // For example, in some cases official apps use this with error 0x2A2 then uses svcBreak.

View File

@ -100,6 +100,7 @@ public:
private: private:
void PopLaunchParameter(Kernel::HLERequestContext& ctx); void PopLaunchParameter(Kernel::HLERequestContext& ctx);
void EnsureSaveData(Kernel::HLERequestContext& ctx);
void SetTerminateResult(Kernel::HLERequestContext& ctx); void SetTerminateResult(Kernel::HLERequestContext& ctx);
void GetDesiredLanguage(Kernel::HLERequestContext& ctx); void GetDesiredLanguage(Kernel::HLERequestContext& ctx);
void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx); void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx);

View File

@ -174,12 +174,12 @@ public:
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &Hid::CreateAppletResource, "CreateAppletResource"}, {0, &Hid::CreateAppletResource, "CreateAppletResource"},
{1, &Hid::ActivateDebugPad, "ActivateDebugPad"}, {1, &Hid::ActivateDebugPad, "ActivateDebugPad"},
{11, nullptr, "ActivateTouchScreen"}, {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"},
{66, &Hid::StartSixAxisSensor, "StartSixAxisSensor"}, {66, &Hid::StartSixAxisSensor, "StartSixAxisSensor"},
{100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"},
{102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"}, {102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"},
{103, &Hid::ActivateNpad, "ActivateNpad"}, {103, &Hid::ActivateNpad, "ActivateNpad"},
{120, nullptr, "SetNpadJoyHoldType"}, {120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"},
{124, nullptr, "SetNpadJoyAssignmentModeDual"}, {124, nullptr, "SetNpadJoyAssignmentModeDual"},
{203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"}, {203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"},
}; };
@ -207,6 +207,12 @@ private:
LOG_WARNING(Service_HID, "(STUBBED) called"); LOG_WARNING(Service_HID, "(STUBBED) called");
} }
void ActivateTouchScreen(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_HID, "(STUBBED) called");
}
void StartSixAxisSensor(Kernel::HLERequestContext& ctx) { void StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2}; IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
@ -231,6 +237,12 @@ private:
LOG_WARNING(Service_HID, "(STUBBED) called"); LOG_WARNING(Service_HID, "(STUBBED) called");
} }
void SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_HID, "(STUBBED) called");
}
void CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) { void CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);