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

Merge pull request #11483 from FearlessTobi/save-size-max

am: Stub GetSaveDataSizeMax
liamwhite 2 лет назад
Родитель
Сommit
7f705870d2
3 измененных файлов с 15 добавлено и 2 удалено
  1. 13 1
      src/core/hle/service/am/am.cpp
  2. 1 0
      src/core/hle/service/am/am.h
  3. 1 1
      src/core/hle/service/sockets/bsd.cpp

+ 13 - 1
src/core/hle/service/am/am.cpp

@@ -1386,7 +1386,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)
         {25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"},
         {25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"},
         {26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"},
         {26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"},
         {27, &IApplicationFunctions::CreateCacheStorage, "CreateCacheStorage"},
         {27, &IApplicationFunctions::CreateCacheStorage, "CreateCacheStorage"},
-        {28, nullptr, "GetSaveDataSizeMax"},
+        {28, &IApplicationFunctions::GetSaveDataSizeMax, "GetSaveDataSizeMax"},
         {29, nullptr, "GetCacheStorageMax"},
         {29, nullptr, "GetCacheStorageMax"},
         {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"},
         {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"},
         {31, &IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed, "EndBlockingHomeButtonShortAndLongPressed"},
         {31, &IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed, "EndBlockingHomeButtonShortAndLongPressed"},
@@ -1821,6 +1821,18 @@ void IApplicationFunctions::CreateCacheStorage(HLERequestContext& ctx) {
     rb.PushRaw(resp);
     rb.PushRaw(resp);
 }
 }
 
 
+void IApplicationFunctions::GetSaveDataSizeMax(HLERequestContext& ctx) {
+    LOG_WARNING(Service_AM, "(STUBBED) called");
+
+    constexpr u64 size_max_normal = 0xFFFFFFF;
+    constexpr u64 size_max_journal = 0xFFFFFFF;
+
+    IPC::ResponseBuilder rb{ctx, 6};
+    rb.Push(ResultSuccess);
+    rb.Push(size_max_normal);
+    rb.Push(size_max_journal);
+}
+
 void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) {
 void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) {
     LOG_WARNING(Service_AM, "(STUBBED) called");
     LOG_WARNING(Service_AM, "(STUBBED) called");
 
 

+ 1 - 0
src/core/hle/service/am/am.h

@@ -316,6 +316,7 @@ private:
     void ExtendSaveData(HLERequestContext& ctx);
     void ExtendSaveData(HLERequestContext& ctx);
     void GetSaveDataSize(HLERequestContext& ctx);
     void GetSaveDataSize(HLERequestContext& ctx);
     void CreateCacheStorage(HLERequestContext& ctx);
     void CreateCacheStorage(HLERequestContext& ctx);
+    void GetSaveDataSizeMax(HLERequestContext& ctx);
     void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
     void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
     void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
     void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
     void BeginBlockingHomeButton(HLERequestContext& ctx);
     void BeginBlockingHomeButton(HLERequestContext& ctx);

+ 1 - 1
src/core/hle/service/sockets/bsd.cpp

@@ -170,7 +170,7 @@ void BSD::Socket(HLERequestContext& ctx) {
 }
 }
 
 
 void BSD::Select(HLERequestContext& ctx) {
 void BSD::Select(HLERequestContext& ctx) {
-    LOG_WARNING(Service, "(STUBBED) called");
+    LOG_DEBUG(Service, "(STUBBED) called");
 
 
     IPC::ResponseBuilder rb{ctx, 4};
     IPC::ResponseBuilder rb{ctx, 4};