summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2014-11-10 23:30:17 -0500
committerGravatar bunnei2014-11-11 23:51:33 -0500
commit0df9c344105a4aad4d6750d0db4e79e546500d77 (patch)
tree531e5acc56ae14f5991660b2e82bdcfb6df70152
parentMerge pull request #169 from archshift/autoplay (diff)
downloadyuzu-0df9c344105a4aad4d6750d0db4e79e546500d77.tar.gz
yuzu-0df9c344105a4aad4d6750d0db4e79e546500d77.tar.xz
yuzu-0df9c344105a4aad4d6750d0db4e79e546500d77.zip
APT_U: Fixes for GetLockHandle to boot system titles.
- Also added comment to GetLockHandle function.
-rw-r--r--src/core/hle/service/apt_u.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/service/apt_u.cpp b/src/core/hle/service/apt_u.cpp
index 617b6add4..5d7f0bac9 100644
--- a/src/core/hle/service/apt_u.cpp
+++ b/src/core/hle/service/apt_u.cpp
@@ -15,6 +15,8 @@
15 15
16namespace APT_U { 16namespace APT_U {
17 17
18static Handle lock_handle = 0;
19
18/// Signals used by APT functions 20/// Signals used by APT functions
19enum class SignalType : u32 { 21enum class SignalType : u32 {
20 None = 0x0, 22 None = 0x0,
@@ -39,8 +41,21 @@ void Initialize(Service::Interface* self) {
39void GetLockHandle(Service::Interface* self) { 41void GetLockHandle(Service::Interface* self) {
40 u32* cmd_buff = Service::GetCommandBuffer(); 42 u32* cmd_buff = Service::GetCommandBuffer();
41 u32 flags = cmd_buff[1]; // TODO(bunnei): Figure out the purpose of the flag field 43 u32 flags = cmd_buff[1]; // TODO(bunnei): Figure out the purpose of the flag field
44
45 if (0 == lock_handle) {
46 // TODO(bunnei): Verify if this is created here or at application boot?
47 lock_handle = Kernel::CreateMutex(false, "APT_U:Lock");
48 Kernel::ReleaseMutex(lock_handle);
49 }
42 cmd_buff[1] = 0; // No error 50 cmd_buff[1] = 0; // No error
43 cmd_buff[5] = Kernel::CreateMutex(false, "APT_U:Lock"); 51
52 // Not sure what these parameters are used for, but retail apps check that they are 0 after
53 // GetLockHandle has been called.
54 cmd_buff[2] = 0;
55 cmd_buff[3] = 0;
56 cmd_buff[4] = 0;
57
58 cmd_buff[5] = lock_handle;
44 DEBUG_LOG(KERNEL, "called handle=0x%08X", cmd_buff[5]); 59 DEBUG_LOG(KERNEL, "called handle=0x%08X", cmd_buff[5]);
45} 60}
46 61
@@ -191,6 +206,8 @@ const Interface::FunctionInfo FunctionTable[] = {
191 206
192Interface::Interface() { 207Interface::Interface() {
193 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 208 Register(FunctionTable, ARRAY_SIZE(FunctionTable));
209
210 lock_handle = 0;
194} 211}
195 212
196Interface::~Interface() { 213Interface::~Interface() {