diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/ipc_helpers.h | 7 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/sm/sm.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/ssl/ssl.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 30 |
7 files changed, 26 insertions, 34 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index 7545ecf2a..a4bfe2eb0 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h | |||
| @@ -290,13 +290,6 @@ public: | |||
| 290 | Skip(CommandIdSize, false); | 290 | Skip(CommandIdSize, false); |
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | ResponseBuilder MakeBuilder(u32 normal_params_size, u32 num_handles_to_copy, | ||
| 294 | u32 num_handles_to_move, | ||
| 295 | ResponseBuilder::Flags flags = ResponseBuilder::Flags::None) const { | ||
| 296 | return ResponseBuilder{*context, normal_params_size, num_handles_to_copy, | ||
| 297 | num_handles_to_move, flags}; | ||
| 298 | } | ||
| 299 | |||
| 300 | template <typename T> | 293 | template <typename T> |
| 301 | T Pop(); | 294 | T Pop(); |
| 302 | 295 | ||
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 9c975325a..69bfce1c1 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -462,7 +462,7 @@ private: | |||
| 462 | 462 | ||
| 463 | std::memcpy(&buffer[offset], data.data(), data.size()); | 463 | std::memcpy(&buffer[offset], data.data(), data.size()); |
| 464 | 464 | ||
| 465 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; | 465 | IPC::ResponseBuilder rb{ctx, 2}; |
| 466 | rb.Push(RESULT_SUCCESS); | 466 | rb.Push(RESULT_SUCCESS); |
| 467 | 467 | ||
| 468 | LOG_DEBUG(Service_AM, "called, offset={}", offset); | 468 | LOG_DEBUG(Service_AM, "called, offset={}", offset); |
| @@ -478,7 +478,7 @@ private: | |||
| 478 | 478 | ||
| 479 | ctx.WriteBuffer(buffer.data() + offset, size); | 479 | ctx.WriteBuffer(buffer.data() + offset, size); |
| 480 | 480 | ||
| 481 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; | 481 | IPC::ResponseBuilder rb{ctx, 2}; |
| 482 | rb.Push(RESULT_SUCCESS); | 482 | rb.Push(RESULT_SUCCESS); |
| 483 | 483 | ||
| 484 | LOG_DEBUG(Service_AM, "called, offset={}", offset); | 484 | LOG_DEBUG(Service_AM, "called, offset={}", offset); |
| @@ -568,7 +568,7 @@ private: | |||
| 568 | IPC::RequestParser rp{ctx}; | 568 | IPC::RequestParser rp{ctx}; |
| 569 | storage_stack.push(rp.PopIpcInterface<AM::IStorage>()); | 569 | storage_stack.push(rp.PopIpcInterface<AM::IStorage>()); |
| 570 | 570 | ||
| 571 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; | 571 | IPC::ResponseBuilder rb{ctx, 2}; |
| 572 | rb.Push(RESULT_SUCCESS); | 572 | rb.Push(RESULT_SUCCESS); |
| 573 | 573 | ||
| 574 | LOG_DEBUG(Service_AM, "called"); | 574 | LOG_DEBUG(Service_AM, "called"); |
| @@ -616,7 +616,7 @@ void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { | |||
| 616 | const u64 size{rp.Pop<u64>()}; | 616 | const u64 size{rp.Pop<u64>()}; |
| 617 | std::vector<u8> buffer(size); | 617 | std::vector<u8> buffer(size); |
| 618 | 618 | ||
| 619 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 1)}; | 619 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 620 | rb.Push(RESULT_SUCCESS); | 620 | rb.Push(RESULT_SUCCESS); |
| 621 | rb.PushIpcInterface<AM::IStorage>(std::move(buffer)); | 621 | rb.PushIpcInterface<AM::IStorage>(std::move(buffer)); |
| 622 | 622 | ||
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 80a002322..ff1edefbb 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -190,7 +190,7 @@ void AudOutU::ListAudioOutsImpl(Kernel::HLERequestContext& ctx) { | |||
| 190 | 190 | ||
| 191 | ctx.WriteBuffer(DefaultDevice); | 191 | ctx.WriteBuffer(DefaultDevice); |
| 192 | 192 | ||
| 193 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 193 | IPC::ResponseBuilder rb{ctx, 3}; |
| 194 | 194 | ||
| 195 | rb.Push(RESULT_SUCCESS); | 195 | rb.Push(RESULT_SUCCESS); |
| 196 | rb.Push<u32>(1); // Amount of audio devices | 196 | rb.Push<u32>(1); // Amount of audio devices |
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index e84c4fa2b..06ac6372d 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -137,7 +137,7 @@ private: | |||
| 137 | constexpr std::array<char, 15> audio_interface{{"AudioInterface"}}; | 137 | constexpr std::array<char, 15> audio_interface{{"AudioInterface"}}; |
| 138 | ctx.WriteBuffer(audio_interface); | 138 | ctx.WriteBuffer(audio_interface); |
| 139 | 139 | ||
| 140 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 140 | IPC::ResponseBuilder rb{ctx, 3}; |
| 141 | rb.Push(RESULT_SUCCESS); | 141 | rb.Push(RESULT_SUCCESS); |
| 142 | rb.Push<u32>(1); | 142 | rb.Push<u32>(1); |
| 143 | } | 143 | } |
| @@ -151,7 +151,7 @@ private: | |||
| 151 | auto file_buffer = ctx.ReadBuffer(); | 151 | auto file_buffer = ctx.ReadBuffer(); |
| 152 | auto end = std::find(file_buffer.begin(), file_buffer.end(), '\0'); | 152 | auto end = std::find(file_buffer.begin(), file_buffer.end(), '\0'); |
| 153 | 153 | ||
| 154 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 154 | IPC::ResponseBuilder rb{ctx, 2}; |
| 155 | rb.Push(RESULT_SUCCESS); | 155 | rb.Push(RESULT_SUCCESS); |
| 156 | } | 156 | } |
| 157 | 157 | ||
| @@ -162,7 +162,7 @@ private: | |||
| 162 | constexpr std::array<char, 12> audio_interface{{"AudioDevice"}}; | 162 | constexpr std::array<char, 12> audio_interface{{"AudioDevice"}}; |
| 163 | ctx.WriteBuffer(audio_interface); | 163 | ctx.WriteBuffer(audio_interface); |
| 164 | 164 | ||
| 165 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 165 | IPC::ResponseBuilder rb{ctx, 3}; |
| 166 | rb.Push(RESULT_SUCCESS); | 166 | rb.Push(RESULT_SUCCESS); |
| 167 | rb.Push<u32>(1); | 167 | rb.Push<u32>(1); |
| 168 | } | 168 | } |
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 096f0fd52..464e79d01 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp | |||
| @@ -108,7 +108,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) { | |||
| 108 | 108 | ||
| 109 | auto client_port = service_manager->GetServicePort(name); | 109 | auto client_port = service_manager->GetServicePort(name); |
| 110 | if (client_port.Failed()) { | 110 | if (client_port.Failed()) { |
| 111 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 111 | IPC::ResponseBuilder rb{ctx, 2}; |
| 112 | rb.Push(client_port.Code()); | 112 | rb.Push(client_port.Code()); |
| 113 | LOG_ERROR(Service_SM, "called service={} -> error 0x{:08X}", name, client_port.Code().raw); | 113 | LOG_ERROR(Service_SM, "called service={} -> error 0x{:08X}", name, client_port.Code().raw); |
| 114 | if (name.length() == 0) | 114 | if (name.length() == 0) |
| @@ -121,8 +121,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) { | |||
| 121 | ASSERT(session.Succeeded()); | 121 | ASSERT(session.Succeeded()); |
| 122 | if (session.Succeeded()) { | 122 | if (session.Succeeded()) { |
| 123 | LOG_DEBUG(Service_SM, "called service={} -> session={}", name, (*session)->GetObjectId()); | 123 | LOG_DEBUG(Service_SM, "called service={} -> session={}", name, (*session)->GetObjectId()); |
| 124 | IPC::ResponseBuilder rb = | 124 | IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles}; |
| 125 | rp.MakeBuilder(2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles); | ||
| 126 | rb.Push(session.Code()); | 125 | rb.Push(session.Code()); |
| 127 | rb.PushMoveObjects(std::move(session).Unwrap()); | 126 | rb.PushMoveObjects(std::move(session).Unwrap()); |
| 128 | } | 127 | } |
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index 63b86e099..fe0a318ee 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp | |||
| @@ -71,7 +71,7 @@ private: | |||
| 71 | LOG_WARNING(Service_SSL, "(STUBBED) called"); | 71 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 72 | IPC::RequestParser rp{ctx}; | 72 | IPC::RequestParser rp{ctx}; |
| 73 | 73 | ||
| 74 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 74 | IPC::ResponseBuilder rb{ctx, 2}; |
| 75 | rb.Push(RESULT_SUCCESS); | 75 | rb.Push(RESULT_SUCCESS); |
| 76 | } | 76 | } |
| 77 | 77 | ||
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index d0cde5ede..2ee60f1ec 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -650,7 +650,7 @@ private: | |||
| 650 | u64 layer_id = rp.Pop<u64>(); | 650 | u64 layer_id = rp.Pop<u64>(); |
| 651 | u64 z_value = rp.Pop<u64>(); | 651 | u64 z_value = rp.Pop<u64>(); |
| 652 | 652 | ||
| 653 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 653 | IPC::ResponseBuilder rb{ctx, 2}; |
| 654 | rb.Push(RESULT_SUCCESS); | 654 | rb.Push(RESULT_SUCCESS); |
| 655 | } | 655 | } |
| 656 | 656 | ||
| @@ -658,7 +658,7 @@ private: | |||
| 658 | IPC::RequestParser rp{ctx}; | 658 | IPC::RequestParser rp{ctx}; |
| 659 | u64 layer_id = rp.Pop<u64>(); | 659 | u64 layer_id = rp.Pop<u64>(); |
| 660 | bool visibility = rp.Pop<bool>(); | 660 | bool visibility = rp.Pop<bool>(); |
| 661 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 661 | IPC::ResponseBuilder rb{ctx, 2}; |
| 662 | rb.Push(RESULT_SUCCESS); | 662 | rb.Push(RESULT_SUCCESS); |
| 663 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, | 663 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, |
| 664 | visibility); | 664 | visibility); |
| @@ -747,7 +747,7 @@ private: | |||
| 747 | IPC::RequestParser rp{ctx}; | 747 | IPC::RequestParser rp{ctx}; |
| 748 | u64 display = rp.Pop<u64>(); | 748 | u64 display = rp.Pop<u64>(); |
| 749 | 749 | ||
| 750 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 750 | IPC::ResponseBuilder rb{ctx, 2}; |
| 751 | rb.Push(RESULT_SUCCESS); | 751 | rb.Push(RESULT_SUCCESS); |
| 752 | } | 752 | } |
| 753 | 753 | ||
| @@ -761,7 +761,7 @@ private: | |||
| 761 | 761 | ||
| 762 | u64 layer_id = nv_flinger->CreateLayer(display); | 762 | u64 layer_id = nv_flinger->CreateLayer(display); |
| 763 | 763 | ||
| 764 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); | 764 | IPC::ResponseBuilder rb{ctx, 4}; |
| 765 | rb.Push(RESULT_SUCCESS); | 765 | rb.Push(RESULT_SUCCESS); |
| 766 | rb.Push(layer_id); | 766 | rb.Push(layer_id); |
| 767 | } | 767 | } |
| @@ -772,7 +772,7 @@ private: | |||
| 772 | u32 stack = rp.Pop<u32>(); | 772 | u32 stack = rp.Pop<u32>(); |
| 773 | u64 layer_id = rp.Pop<u64>(); | 773 | u64 layer_id = rp.Pop<u64>(); |
| 774 | 774 | ||
| 775 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 775 | IPC::ResponseBuilder rb{ctx, 2}; |
| 776 | rb.Push(RESULT_SUCCESS); | 776 | rb.Push(RESULT_SUCCESS); |
| 777 | } | 777 | } |
| 778 | 778 | ||
| @@ -780,7 +780,7 @@ private: | |||
| 780 | IPC::RequestParser rp{ctx}; | 780 | IPC::RequestParser rp{ctx}; |
| 781 | u64 layer_id = rp.Pop<u64>(); | 781 | u64 layer_id = rp.Pop<u64>(); |
| 782 | bool visibility = rp.Pop<bool>(); | 782 | bool visibility = rp.Pop<bool>(); |
| 783 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 783 | IPC::ResponseBuilder rb{ctx, 2}; |
| 784 | rb.Push(RESULT_SUCCESS); | 784 | rb.Push(RESULT_SUCCESS); |
| 785 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:X}, visibility={}", layer_id, | 785 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:X}, visibility={}", layer_id, |
| 786 | visibility); | 786 | visibility); |
| @@ -837,7 +837,7 @@ private: | |||
| 837 | 837 | ||
| 838 | ASSERT_MSG(name == "Default", "Non-default displays aren't supported yet"); | 838 | ASSERT_MSG(name == "Default", "Non-default displays aren't supported yet"); |
| 839 | 839 | ||
| 840 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); | 840 | IPC::ResponseBuilder rb{ctx, 4}; |
| 841 | rb.Push(RESULT_SUCCESS); | 841 | rb.Push(RESULT_SUCCESS); |
| 842 | rb.Push<u64>(nv_flinger->OpenDisplay(name)); | 842 | rb.Push<u64>(nv_flinger->OpenDisplay(name)); |
| 843 | } | 843 | } |
| @@ -847,7 +847,7 @@ private: | |||
| 847 | IPC::RequestParser rp{ctx}; | 847 | IPC::RequestParser rp{ctx}; |
| 848 | u64 display_id = rp.Pop<u64>(); | 848 | u64 display_id = rp.Pop<u64>(); |
| 849 | 849 | ||
| 850 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 850 | IPC::ResponseBuilder rb{ctx, 2}; |
| 851 | rb.Push(RESULT_SUCCESS); | 851 | rb.Push(RESULT_SUCCESS); |
| 852 | } | 852 | } |
| 853 | 853 | ||
| @@ -856,7 +856,7 @@ private: | |||
| 856 | IPC::RequestParser rp{ctx}; | 856 | IPC::RequestParser rp{ctx}; |
| 857 | u64 display_id = rp.Pop<u64>(); | 857 | u64 display_id = rp.Pop<u64>(); |
| 858 | 858 | ||
| 859 | IPC::ResponseBuilder rb = rp.MakeBuilder(6, 0, 0); | 859 | IPC::ResponseBuilder rb{ctx, 6}; |
| 860 | rb.Push(RESULT_SUCCESS); | 860 | rb.Push(RESULT_SUCCESS); |
| 861 | 861 | ||
| 862 | if (Settings::values.use_docked_mode) { | 862 | if (Settings::values.use_docked_mode) { |
| @@ -874,7 +874,7 @@ private: | |||
| 874 | u32 scaling_mode = rp.Pop<u32>(); | 874 | u32 scaling_mode = rp.Pop<u32>(); |
| 875 | u64 unknown = rp.Pop<u64>(); | 875 | u64 unknown = rp.Pop<u64>(); |
| 876 | 876 | ||
| 877 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 877 | IPC::ResponseBuilder rb{ctx, 2}; |
| 878 | rb.Push(RESULT_SUCCESS); | 878 | rb.Push(RESULT_SUCCESS); |
| 879 | } | 879 | } |
| 880 | 880 | ||
| @@ -882,7 +882,7 @@ private: | |||
| 882 | IPC::RequestParser rp{ctx}; | 882 | IPC::RequestParser rp{ctx}; |
| 883 | DisplayInfo display_info; | 883 | DisplayInfo display_info; |
| 884 | ctx.WriteBuffer(&display_info, sizeof(DisplayInfo)); | 884 | ctx.WriteBuffer(&display_info, sizeof(DisplayInfo)); |
| 885 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); | 885 | IPC::ResponseBuilder rb{ctx, 4}; |
| 886 | rb.Push(RESULT_SUCCESS); | 886 | rb.Push(RESULT_SUCCESS); |
| 887 | rb.Push<u64>(1); | 887 | rb.Push<u64>(1); |
| 888 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 888 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| @@ -903,7 +903,7 @@ private: | |||
| 903 | u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); | 903 | u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); |
| 904 | 904 | ||
| 905 | NativeWindow native_window{buffer_queue_id}; | 905 | NativeWindow native_window{buffer_queue_id}; |
| 906 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); | 906 | IPC::ResponseBuilder rb{ctx, 4}; |
| 907 | rb.Push(RESULT_SUCCESS); | 907 | rb.Push(RESULT_SUCCESS); |
| 908 | rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize())); | 908 | rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize())); |
| 909 | } | 909 | } |
| @@ -922,7 +922,7 @@ private: | |||
| 922 | u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); | 922 | u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); |
| 923 | 923 | ||
| 924 | NativeWindow native_window{buffer_queue_id}; | 924 | NativeWindow native_window{buffer_queue_id}; |
| 925 | IPC::ResponseBuilder rb = rp.MakeBuilder(6, 0, 0); | 925 | IPC::ResponseBuilder rb{ctx, 6}; |
| 926 | rb.Push(RESULT_SUCCESS); | 926 | rb.Push(RESULT_SUCCESS); |
| 927 | rb.Push(layer_id); | 927 | rb.Push(layer_id); |
| 928 | rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize())); | 928 | rb.Push<u64>(ctx.WriteBuffer(native_window.Serialize())); |
| @@ -934,7 +934,7 @@ private: | |||
| 934 | IPC::RequestParser rp{ctx}; | 934 | IPC::RequestParser rp{ctx}; |
| 935 | u64 layer_id = rp.Pop<u64>(); | 935 | u64 layer_id = rp.Pop<u64>(); |
| 936 | 936 | ||
| 937 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 937 | IPC::ResponseBuilder rb{ctx, 2}; |
| 938 | rb.Push(RESULT_SUCCESS); | 938 | rb.Push(RESULT_SUCCESS); |
| 939 | } | 939 | } |
| 940 | 940 | ||
| @@ -945,7 +945,7 @@ private: | |||
| 945 | 945 | ||
| 946 | auto vsync_event = nv_flinger->GetVsyncEvent(display_id); | 946 | auto vsync_event = nv_flinger->GetVsyncEvent(display_id); |
| 947 | 947 | ||
| 948 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 1, 0); | 948 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 949 | rb.Push(RESULT_SUCCESS); | 949 | rb.Push(RESULT_SUCCESS); |
| 950 | rb.PushCopyObjects(vsync_event); | 950 | rb.PushCopyObjects(vsync_event); |
| 951 | } | 951 | } |