diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/applets.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/applets.h | 24 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/error.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/general_backend.cpp | 14 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/profile_select.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/software_keyboard.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/web_browser.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 16 |
9 files changed, 52 insertions, 50 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index c1550013a..cc978713b 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -847,7 +847,7 @@ private: | |||
| 847 | LOG_DEBUG(Service_AM, "called"); | 847 | LOG_DEBUG(Service_AM, "called"); |
| 848 | 848 | ||
| 849 | IPC::RequestParser rp{ctx}; | 849 | IPC::RequestParser rp{ctx}; |
| 850 | applet->GetBroker().PushNormalDataFromGame(*rp.PopIpcInterface<IStorage>()); | 850 | applet->GetBroker().PushNormalDataFromGame(rp.PopIpcInterface<IStorage>()); |
| 851 | 851 | ||
| 852 | IPC::ResponseBuilder rb{ctx, 2}; | 852 | IPC::ResponseBuilder rb{ctx, 2}; |
| 853 | rb.Push(RESULT_SUCCESS); | 853 | rb.Push(RESULT_SUCCESS); |
| @@ -867,14 +867,14 @@ private: | |||
| 867 | 867 | ||
| 868 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 868 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 869 | rb.Push(RESULT_SUCCESS); | 869 | rb.Push(RESULT_SUCCESS); |
| 870 | rb.PushIpcInterface<IStorage>(std::move(*storage)); | 870 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 871 | } | 871 | } |
| 872 | 872 | ||
| 873 | void PushInteractiveInData(Kernel::HLERequestContext& ctx) { | 873 | void PushInteractiveInData(Kernel::HLERequestContext& ctx) { |
| 874 | LOG_DEBUG(Service_AM, "called"); | 874 | LOG_DEBUG(Service_AM, "called"); |
| 875 | 875 | ||
| 876 | IPC::RequestParser rp{ctx}; | 876 | IPC::RequestParser rp{ctx}; |
| 877 | applet->GetBroker().PushInteractiveDataFromGame(*rp.PopIpcInterface<IStorage>()); | 877 | applet->GetBroker().PushInteractiveDataFromGame(rp.PopIpcInterface<IStorage>()); |
| 878 | 878 | ||
| 879 | ASSERT(applet->IsInitialized()); | 879 | ASSERT(applet->IsInitialized()); |
| 880 | applet->ExecuteInteractive(); | 880 | applet->ExecuteInteractive(); |
| @@ -898,7 +898,7 @@ private: | |||
| 898 | 898 | ||
| 899 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 899 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 900 | rb.Push(RESULT_SUCCESS); | 900 | rb.Push(RESULT_SUCCESS); |
| 901 | rb.PushIpcInterface<IStorage>(std::move(*storage)); | 901 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 902 | } | 902 | } |
| 903 | 903 | ||
| 904 | void GetPopOutDataEvent(Kernel::HLERequestContext& ctx) { | 904 | void GetPopOutDataEvent(Kernel::HLERequestContext& ctx) { |
diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index 3e97ba218..c3261f3e6 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp | |||
| @@ -50,7 +50,7 @@ AppletDataBroker::RawChannelData AppletDataBroker::PeekDataToAppletForDebug() co | |||
| 50 | return {std::move(out_normal), std::move(out_interactive)}; | 50 | return {std::move(out_normal), std::move(out_interactive)}; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | std::unique_ptr<IStorage> AppletDataBroker::PopNormalDataToGame() { | 53 | std::shared_ptr<IStorage> AppletDataBroker::PopNormalDataToGame() { |
| 54 | if (out_channel.empty()) | 54 | if (out_channel.empty()) |
| 55 | return nullptr; | 55 | return nullptr; |
| 56 | 56 | ||
| @@ -60,7 +60,7 @@ std::unique_ptr<IStorage> AppletDataBroker::PopNormalDataToGame() { | |||
| 60 | return out; | 60 | return out; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | std::unique_ptr<IStorage> AppletDataBroker::PopNormalDataToApplet() { | 63 | std::shared_ptr<IStorage> AppletDataBroker::PopNormalDataToApplet() { |
| 64 | if (in_channel.empty()) | 64 | if (in_channel.empty()) |
| 65 | return nullptr; | 65 | return nullptr; |
| 66 | 66 | ||
| @@ -69,7 +69,7 @@ std::unique_ptr<IStorage> AppletDataBroker::PopNormalDataToApplet() { | |||
| 69 | return out; | 69 | return out; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | std::unique_ptr<IStorage> AppletDataBroker::PopInteractiveDataToGame() { | 72 | std::shared_ptr<IStorage> AppletDataBroker::PopInteractiveDataToGame() { |
| 73 | if (out_interactive_channel.empty()) | 73 | if (out_interactive_channel.empty()) |
| 74 | return nullptr; | 74 | return nullptr; |
| 75 | 75 | ||
| @@ -79,7 +79,7 @@ std::unique_ptr<IStorage> AppletDataBroker::PopInteractiveDataToGame() { | |||
| 79 | return out; | 79 | return out; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | std::unique_ptr<IStorage> AppletDataBroker::PopInteractiveDataToApplet() { | 82 | std::shared_ptr<IStorage> AppletDataBroker::PopInteractiveDataToApplet() { |
| 83 | if (in_interactive_channel.empty()) | 83 | if (in_interactive_channel.empty()) |
| 84 | return nullptr; | 84 | return nullptr; |
| 85 | 85 | ||
| @@ -88,21 +88,21 @@ std::unique_ptr<IStorage> AppletDataBroker::PopInteractiveDataToApplet() { | |||
| 88 | return out; | 88 | return out; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void AppletDataBroker::PushNormalDataFromGame(IStorage storage) { | 91 | void AppletDataBroker::PushNormalDataFromGame(std::shared_ptr<IStorage>&& storage) { |
| 92 | in_channel.push_back(std::make_unique<IStorage>(storage)); | 92 | in_channel.emplace_back(std::move(storage)); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void AppletDataBroker::PushNormalDataFromApplet(IStorage storage) { | 95 | void AppletDataBroker::PushNormalDataFromApplet(std::shared_ptr<IStorage>&& storage) { |
| 96 | out_channel.push_back(std::make_unique<IStorage>(storage)); | 96 | out_channel.emplace_back(std::move(storage)); |
| 97 | pop_out_data_event.writable->Signal(); | 97 | pop_out_data_event.writable->Signal(); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void AppletDataBroker::PushInteractiveDataFromGame(IStorage storage) { | 100 | void AppletDataBroker::PushInteractiveDataFromGame(std::shared_ptr<IStorage>&& storage) { |
| 101 | in_interactive_channel.push_back(std::make_unique<IStorage>(storage)); | 101 | in_interactive_channel.emplace_back(std::move(storage)); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | void AppletDataBroker::PushInteractiveDataFromApplet(IStorage storage) { | 104 | void AppletDataBroker::PushInteractiveDataFromApplet(std::shared_ptr<IStorage>&& storage) { |
| 105 | out_interactive_channel.push_back(std::make_unique<IStorage>(storage)); | 105 | out_interactive_channel.emplace_back(std::move(storage)); |
| 106 | pop_interactive_out_data_event.writable->Signal(); | 106 | pop_interactive_out_data_event.writable->Signal(); |
| 107 | } | 107 | } |
| 108 | 108 | ||
diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h index 16e61fc6f..e75be86a2 100644 --- a/src/core/hle/service/am/applets/applets.h +++ b/src/core/hle/service/am/applets/applets.h | |||
| @@ -72,17 +72,17 @@ public: | |||
| 72 | // Retrieves but does not pop the data sent to applet. | 72 | // Retrieves but does not pop the data sent to applet. |
| 73 | RawChannelData PeekDataToAppletForDebug() const; | 73 | RawChannelData PeekDataToAppletForDebug() const; |
| 74 | 74 | ||
| 75 | std::unique_ptr<IStorage> PopNormalDataToGame(); | 75 | std::shared_ptr<IStorage> PopNormalDataToGame(); |
| 76 | std::unique_ptr<IStorage> PopNormalDataToApplet(); | 76 | std::shared_ptr<IStorage> PopNormalDataToApplet(); |
| 77 | 77 | ||
| 78 | std::unique_ptr<IStorage> PopInteractiveDataToGame(); | 78 | std::shared_ptr<IStorage> PopInteractiveDataToGame(); |
| 79 | std::unique_ptr<IStorage> PopInteractiveDataToApplet(); | 79 | std::shared_ptr<IStorage> PopInteractiveDataToApplet(); |
| 80 | 80 | ||
| 81 | void PushNormalDataFromGame(IStorage storage); | 81 | void PushNormalDataFromGame(std::shared_ptr<IStorage>&& storage); |
| 82 | void PushNormalDataFromApplet(IStorage storage); | 82 | void PushNormalDataFromApplet(std::shared_ptr<IStorage>&& storage); |
| 83 | 83 | ||
| 84 | void PushInteractiveDataFromGame(IStorage storage); | 84 | void PushInteractiveDataFromGame(std::shared_ptr<IStorage>&& storage); |
| 85 | void PushInteractiveDataFromApplet(IStorage storage); | 85 | void PushInteractiveDataFromApplet(std::shared_ptr<IStorage>&& storage); |
| 86 | 86 | ||
| 87 | void SignalStateChanged() const; | 87 | void SignalStateChanged() const; |
| 88 | 88 | ||
| @@ -94,16 +94,16 @@ private: | |||
| 94 | // Queues are named from applet's perspective | 94 | // Queues are named from applet's perspective |
| 95 | 95 | ||
| 96 | // PopNormalDataToApplet and PushNormalDataFromGame | 96 | // PopNormalDataToApplet and PushNormalDataFromGame |
| 97 | std::deque<std::unique_ptr<IStorage>> in_channel; | 97 | std::deque<std::shared_ptr<IStorage>> in_channel; |
| 98 | 98 | ||
| 99 | // PopNormalDataToGame and PushNormalDataFromApplet | 99 | // PopNormalDataToGame and PushNormalDataFromApplet |
| 100 | std::deque<std::unique_ptr<IStorage>> out_channel; | 100 | std::deque<std::shared_ptr<IStorage>> out_channel; |
| 101 | 101 | ||
| 102 | // PopInteractiveDataToApplet and PushInteractiveDataFromGame | 102 | // PopInteractiveDataToApplet and PushInteractiveDataFromGame |
| 103 | std::deque<std::unique_ptr<IStorage>> in_interactive_channel; | 103 | std::deque<std::shared_ptr<IStorage>> in_interactive_channel; |
| 104 | 104 | ||
| 105 | // PopInteractiveDataToGame and PushInteractiveDataFromApplet | 105 | // PopInteractiveDataToGame and PushInteractiveDataFromApplet |
| 106 | std::deque<std::unique_ptr<IStorage>> out_interactive_channel; | 106 | std::deque<std::shared_ptr<IStorage>> out_interactive_channel; |
| 107 | 107 | ||
| 108 | Kernel::EventPair state_changed_event; | 108 | Kernel::EventPair state_changed_event; |
| 109 | 109 | ||
diff --git a/src/core/hle/service/am/applets/error.cpp b/src/core/hle/service/am/applets/error.cpp index e6c4e8b87..f12fd7f89 100644 --- a/src/core/hle/service/am/applets/error.cpp +++ b/src/core/hle/service/am/applets/error.cpp | |||
| @@ -186,7 +186,7 @@ void Error::Execute() { | |||
| 186 | 186 | ||
| 187 | void Error::DisplayCompleted() { | 187 | void Error::DisplayCompleted() { |
| 188 | complete = true; | 188 | complete = true; |
| 189 | broker.PushNormalDataFromApplet(IStorage{std::vector<u8>{}}); | 189 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::vector<u8>{})); |
| 190 | broker.SignalStateChanged(); | 190 | broker.SignalStateChanged(); |
| 191 | } | 191 | } |
| 192 | 192 | ||
diff --git a/src/core/hle/service/am/applets/general_backend.cpp b/src/core/hle/service/am/applets/general_backend.cpp index fe8400a15..104501ac5 100644 --- a/src/core/hle/service/am/applets/general_backend.cpp +++ b/src/core/hle/service/am/applets/general_backend.cpp | |||
| @@ -20,7 +20,7 @@ namespace Service::AM::Applets { | |||
| 20 | constexpr ResultCode ERROR_INVALID_PIN{ErrorModule::PCTL, 221}; | 20 | constexpr ResultCode ERROR_INVALID_PIN{ErrorModule::PCTL, 221}; |
| 21 | 21 | ||
| 22 | static void LogCurrentStorage(AppletDataBroker& broker, std::string_view prefix) { | 22 | static void LogCurrentStorage(AppletDataBroker& broker, std::string_view prefix) { |
| 23 | std::unique_ptr<IStorage> storage = broker.PopNormalDataToApplet(); | 23 | std::shared_ptr<IStorage> storage = broker.PopNormalDataToApplet(); |
| 24 | for (; storage != nullptr; storage = broker.PopNormalDataToApplet()) { | 24 | for (; storage != nullptr; storage = broker.PopNormalDataToApplet()) { |
| 25 | const auto data = storage->GetData(); | 25 | const auto data = storage->GetData(); |
| 26 | LOG_INFO(Service_AM, | 26 | LOG_INFO(Service_AM, |
| @@ -148,7 +148,7 @@ void Auth::AuthFinished(bool successful) { | |||
| 148 | std::vector<u8> out(sizeof(Return)); | 148 | std::vector<u8> out(sizeof(Return)); |
| 149 | std::memcpy(out.data(), &return_, sizeof(Return)); | 149 | std::memcpy(out.data(), &return_, sizeof(Return)); |
| 150 | 150 | ||
| 151 | broker.PushNormalDataFromApplet(IStorage{std::move(out)}); | 151 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(out))); |
| 152 | broker.SignalStateChanged(); | 152 | broker.SignalStateChanged(); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| @@ -198,7 +198,7 @@ void PhotoViewer::Execute() { | |||
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | void PhotoViewer::ViewFinished() { | 200 | void PhotoViewer::ViewFinished() { |
| 201 | broker.PushNormalDataFromApplet(IStorage{std::vector<u8>{}}); | 201 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::vector<u8>{})); |
| 202 | broker.SignalStateChanged(); | 202 | broker.SignalStateChanged(); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| @@ -234,8 +234,8 @@ void StubApplet::ExecuteInteractive() { | |||
| 234 | LOG_WARNING(Service_AM, "called (STUBBED)"); | 234 | LOG_WARNING(Service_AM, "called (STUBBED)"); |
| 235 | LogCurrentStorage(broker, "ExecuteInteractive"); | 235 | LogCurrentStorage(broker, "ExecuteInteractive"); |
| 236 | 236 | ||
| 237 | broker.PushNormalDataFromApplet(IStorage{std::vector<u8>(0x1000)}); | 237 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::vector<u8>(0x1000))); |
| 238 | broker.PushInteractiveDataFromApplet(IStorage{std::vector<u8>(0x1000)}); | 238 | broker.PushInteractiveDataFromApplet(std::make_shared<IStorage>(std::vector<u8>(0x1000))); |
| 239 | broker.SignalStateChanged(); | 239 | broker.SignalStateChanged(); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| @@ -243,8 +243,8 @@ void StubApplet::Execute() { | |||
| 243 | LOG_WARNING(Service_AM, "called (STUBBED)"); | 243 | LOG_WARNING(Service_AM, "called (STUBBED)"); |
| 244 | LogCurrentStorage(broker, "Execute"); | 244 | LogCurrentStorage(broker, "Execute"); |
| 245 | 245 | ||
| 246 | broker.PushNormalDataFromApplet(IStorage{std::vector<u8>(0x1000)}); | 246 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::vector<u8>(0x1000))); |
| 247 | broker.PushInteractiveDataFromApplet(IStorage{std::vector<u8>(0x1000)}); | 247 | broker.PushInteractiveDataFromApplet(std::make_shared<IStorage>(std::vector<u8>(0x1000))); |
| 248 | broker.SignalStateChanged(); | 248 | broker.SignalStateChanged(); |
| 249 | } | 249 | } |
| 250 | 250 | ||
diff --git a/src/core/hle/service/am/applets/profile_select.cpp b/src/core/hle/service/am/applets/profile_select.cpp index 91d00f72a..70cc23552 100644 --- a/src/core/hle/service/am/applets/profile_select.cpp +++ b/src/core/hle/service/am/applets/profile_select.cpp | |||
| @@ -50,7 +50,7 @@ void ProfileSelect::ExecuteInteractive() { | |||
| 50 | 50 | ||
| 51 | void ProfileSelect::Execute() { | 51 | void ProfileSelect::Execute() { |
| 52 | if (complete) { | 52 | if (complete) { |
| 53 | broker.PushNormalDataFromApplet(IStorage{std::move(final_data)}); | 53 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(final_data))); |
| 54 | return; | 54 | return; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| @@ -71,7 +71,7 @@ void ProfileSelect::SelectionComplete(std::optional<Common::UUID> uuid) { | |||
| 71 | 71 | ||
| 72 | final_data = std::vector<u8>(sizeof(UserSelectionOutput)); | 72 | final_data = std::vector<u8>(sizeof(UserSelectionOutput)); |
| 73 | std::memcpy(final_data.data(), &output, final_data.size()); | 73 | std::memcpy(final_data.data(), &output, final_data.size()); |
| 74 | broker.PushNormalDataFromApplet(IStorage{std::move(final_data)}); | 74 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(final_data))); |
| 75 | broker.SignalStateChanged(); | 75 | broker.SignalStateChanged(); |
| 76 | } | 76 | } |
| 77 | 77 | ||
diff --git a/src/core/hle/service/am/applets/software_keyboard.cpp b/src/core/hle/service/am/applets/software_keyboard.cpp index 964c67202..54e63c138 100644 --- a/src/core/hle/service/am/applets/software_keyboard.cpp +++ b/src/core/hle/service/am/applets/software_keyboard.cpp | |||
| @@ -102,7 +102,7 @@ void SoftwareKeyboard::ExecuteInteractive() { | |||
| 102 | 102 | ||
| 103 | void SoftwareKeyboard::Execute() { | 103 | void SoftwareKeyboard::Execute() { |
| 104 | if (complete) { | 104 | if (complete) { |
| 105 | broker.PushNormalDataFromApplet(IStorage{std::move(final_data)}); | 105 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(final_data))); |
| 106 | broker.SignalStateChanged(); | 106 | broker.SignalStateChanged(); |
| 107 | return; | 107 | return; |
| 108 | } | 108 | } |
| @@ -145,15 +145,15 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) { | |||
| 145 | final_data = output_main; | 145 | final_data = output_main; |
| 146 | 146 | ||
| 147 | if (complete) { | 147 | if (complete) { |
| 148 | broker.PushNormalDataFromApplet(IStorage{std::move(output_main)}); | 148 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(output_main))); |
| 149 | broker.SignalStateChanged(); | 149 | broker.SignalStateChanged(); |
| 150 | } else { | 150 | } else { |
| 151 | broker.PushInteractiveDataFromApplet(IStorage{std::move(output_sub)}); | 151 | broker.PushInteractiveDataFromApplet(std::make_shared<IStorage>(std::move(output_sub))); |
| 152 | } | 152 | } |
| 153 | } else { | 153 | } else { |
| 154 | output_main[0] = 1; | 154 | output_main[0] = 1; |
| 155 | complete = true; | 155 | complete = true; |
| 156 | broker.PushNormalDataFromApplet(IStorage{std::move(output_main)}); | 156 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(output_main))); |
| 157 | broker.SignalStateChanged(); | 157 | broker.SignalStateChanged(); |
| 158 | } | 158 | } |
| 159 | } | 159 | } |
diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp index 05d6b3a19..12443c910 100644 --- a/src/core/hle/service/am/applets/web_browser.cpp +++ b/src/core/hle/service/am/applets/web_browser.cpp | |||
| @@ -284,7 +284,7 @@ void WebBrowser::Finalize() { | |||
| 284 | std::vector<u8> data(sizeof(WebCommonReturnValue)); | 284 | std::vector<u8> data(sizeof(WebCommonReturnValue)); |
| 285 | std::memcpy(data.data(), &out, sizeof(WebCommonReturnValue)); | 285 | std::memcpy(data.data(), &out, sizeof(WebCommonReturnValue)); |
| 286 | 286 | ||
| 287 | broker.PushNormalDataFromApplet(IStorage{std::move(data)}); | 287 | broker.PushNormalDataFromApplet(std::make_shared<IStorage>(std::move(data))); |
| 288 | broker.SignalStateChanged(); | 288 | broker.SignalStateChanged(); |
| 289 | 289 | ||
| 290 | if (!temporary_dir.empty() && FileUtil::IsDirectory(temporary_dir)) { | 290 | if (!temporary_dir.empty() && FileUtil::IsDirectory(temporary_dir)) { |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 55d62fc5e..e6811d5b5 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -420,7 +420,7 @@ public: | |||
| 420 | return; | 420 | return; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | IFile file(result.Unwrap()); | 423 | auto file = std::make_shared<IFile>(result.Unwrap()); |
| 424 | 424 | ||
| 425 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 425 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 426 | rb.Push(RESULT_SUCCESS); | 426 | rb.Push(RESULT_SUCCESS); |
| @@ -445,7 +445,7 @@ public: | |||
| 445 | return; | 445 | return; |
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | IDirectory directory(result.Unwrap()); | 448 | auto directory = std::make_shared<IDirectory>(result.Unwrap()); |
| 449 | 449 | ||
| 450 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 450 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 451 | rb.Push(RESULT_SUCCESS); | 451 | rb.Push(RESULT_SUCCESS); |
| @@ -794,8 +794,8 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { | |||
| 794 | void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { | 794 | void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { |
| 795 | LOG_DEBUG(Service_FS, "called"); | 795 | LOG_DEBUG(Service_FS, "called"); |
| 796 | 796 | ||
| 797 | IFileSystem filesystem(fsc.OpenSDMC().Unwrap(), | 797 | auto filesystem = std::make_shared<IFileSystem>( |
| 798 | SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard)); | 798 | fsc.OpenSDMC().Unwrap(), SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard)); |
| 799 | 799 | ||
| 800 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 800 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 801 | rb.Push(RESULT_SUCCESS); | 801 | rb.Push(RESULT_SUCCESS); |
| @@ -846,7 +846,8 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 846 | id = FileSys::StorageId::NandSystem; | 846 | id = FileSys::StorageId::NandSystem; |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | IFileSystem filesystem(std::move(dir.Unwrap()), SizeGetter::FromStorageId(fsc, id)); | 849 | auto filesystem = |
| 850 | std::make_shared<IFileSystem>(std::move(dir.Unwrap()), SizeGetter::FromStorageId(fsc, id)); | ||
| 850 | 851 | ||
| 851 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 852 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 852 | rb.Push(RESULT_SUCCESS); | 853 | rb.Push(RESULT_SUCCESS); |
| @@ -898,7 +899,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 898 | return; | 899 | return; |
| 899 | } | 900 | } |
| 900 | 901 | ||
| 901 | IStorage storage(std::move(romfs.Unwrap())); | 902 | auto storage = std::make_shared<IStorage>(std::move(romfs.Unwrap())); |
| 902 | 903 | ||
| 903 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 904 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 904 | rb.Push(RESULT_SUCCESS); | 905 | rb.Push(RESULT_SUCCESS); |
| @@ -937,7 +938,8 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | |||
| 937 | 938 | ||
| 938 | FileSys::PatchManager pm{title_id}; | 939 | FileSys::PatchManager pm{title_id}; |
| 939 | 940 | ||
| 940 | IStorage storage(pm.PatchRomFS(std::move(data.Unwrap()), 0, FileSys::ContentRecordType::Data)); | 941 | auto storage = std::make_shared<IStorage>( |
| 942 | pm.PatchRomFS(std::move(data.Unwrap()), 0, FileSys::ContentRecordType::Data)); | ||
| 941 | 943 | ||
| 942 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 944 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 943 | rb.Push(RESULT_SUCCESS); | 945 | rb.Push(RESULT_SUCCESS); |