Просмотр исходного кода

updated APT_U::GetLockHandle to return a valid handle

bunnei 12 лет назад
Родитель
Сommit
540a693eae
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      src/core/hle/service/apt.cpp

+ 5 - 1
src/core/hle/service/apt.cpp

@@ -19,7 +19,11 @@ void Initialize(Service::Interface* self) {
 
 
 void GetLockHandle(Service::Interface* self) {
 void GetLockHandle(Service::Interface* self) {
     u32* cmd_buff = Service::GetCommandBuffer();
     u32* cmd_buff = Service::GetCommandBuffer();
-    cmd_buff[5] = 0x00000000; // TODO: This should be an actual mutex handle
+    u32 flags = cmd_buff[1];
+
+    // TODO: This should be an actual mutex handle. Games will check that this is not non-zero 
+    // (NULL), and fail if such. A faked non-zero value will at least enable further booting. 
+    cmd_buff[5] = 0xDEADBEEF;
 }
 }
 
 
 const Interface::FunctionInfo FunctionTable[] = {
 const Interface::FunctionInfo FunctionTable[] = {