diff options
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/ipc_helpers.h | 4 | ||||
| -rw-r--r-- | src/core/hle/service/apt/apt.cpp | 38 | ||||
| -rw-r--r-- | src/core/hle/service/y2r_u.cpp | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index 263b0ff5d..98c95a7f3 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h | |||
| @@ -119,7 +119,7 @@ inline void RequestBuilder::Push(u64 value) { | |||
| 119 | 119 | ||
| 120 | template <> | 120 | template <> |
| 121 | inline void RequestBuilder::Push(bool value) { | 121 | inline void RequestBuilder::Push(bool value) { |
| 122 | Push(u8(value)); | 122 | Push(static_cast<u8>(value)); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | template <> | 125 | template <> |
| @@ -277,7 +277,7 @@ inline u64 RequestParser::Pop() { | |||
| 277 | 277 | ||
| 278 | template <> | 278 | template <> |
| 279 | inline bool RequestParser::Pop() { | 279 | inline bool RequestParser::Pop() { |
| 280 | return Pop<u8>() != 0; // != 0 to remove warning C4800 | 280 | return Pop<u8>() != 0; |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | template <> | 283 | template <> |
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index c2098d2e8..c323deaa4 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp | |||
| @@ -72,7 +72,7 @@ void GetSharedFont(Service::Interface* self) { | |||
| 72 | if (!shared_font_mem) { | 72 | if (!shared_font_mem) { |
| 73 | LOG_ERROR(Service_APT, "shared font file missing - go dump it from your 3ds"); | 73 | LOG_ERROR(Service_APT, "shared font file missing - go dump it from your 3ds"); |
| 74 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | 74 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); |
| 75 | rb.Push(u32(-1)); // Failure | 75 | rb.Push<u32>(-1); // TODO: Find the right error code |
| 76 | return; | 76 | return; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| @@ -112,7 +112,7 @@ void GetLockHandle(Service::Interface* self) { | |||
| 112 | IPC::RequestBuilder rb = rp.MakeBuilder(3, 2); | 112 | IPC::RequestBuilder rb = rp.MakeBuilder(3, 2); |
| 113 | rb.Push(RESULT_SUCCESS); // No error | 113 | rb.Push(RESULT_SUCCESS); // No error |
| 114 | rb.Push(applet_attributes); // Applet Attributes, this value is passed to Enable. | 114 | rb.Push(applet_attributes); // Applet Attributes, this value is passed to Enable. |
| 115 | rb.Push(u32(0)); // Least significant bit = power button state | 115 | rb.Push<u32>(0); // Least significant bit = power button state |
| 116 | Kernel::Handle handleCopy = Kernel::g_handle_table.Create(lock).MoveFrom(); | 116 | Kernel::Handle handleCopy = Kernel::g_handle_table.Create(lock).MoveFrom(); |
| 117 | rb.PushCopyHandles(handleCopy); | 117 | rb.PushCopyHandles(handleCopy); |
| 118 | 118 | ||
| @@ -134,8 +134,8 @@ void GetAppletManInfo(Service::Interface* self) { | |||
| 134 | u32 unk = rp.Pop<u32>(); | 134 | u32 unk = rp.Pop<u32>(); |
| 135 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | 135 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); |
| 136 | rb.Push(RESULT_SUCCESS); // No error | 136 | rb.Push(RESULT_SUCCESS); // No error |
| 137 | rb.Push(u32(0)); | 137 | rb.Push<u32>(0); |
| 138 | rb.Push(u32(0)); | 138 | rb.Push<u32>(0); |
| 139 | rb.Push(static_cast<u32>(AppletId::HomeMenu)); // Home menu AppID | 139 | rb.Push(static_cast<u32>(AppletId::HomeMenu)); // Home menu AppID |
| 140 | rb.Push(static_cast<u32>(AppletId::Application)); // TODO(purpasmart96): Do this correctly | 140 | rb.Push(static_cast<u32>(AppletId::Application)); // TODO(purpasmart96): Do this correctly |
| 141 | 141 | ||
| @@ -150,12 +150,12 @@ void IsRegistered(Service::Interface* self) { | |||
| 150 | 150 | ||
| 151 | // TODO(Subv): An application is considered "registered" if it has already called APT::Enable | 151 | // TODO(Subv): An application is considered "registered" if it has already called APT::Enable |
| 152 | // handle this properly once we implement multiprocess support. | 152 | // handle this properly once we implement multiprocess support. |
| 153 | u32 isRegistered = 0; // Set to not registered by default | 153 | bool isRegistered = false; // Set to not registered by default |
| 154 | 154 | ||
| 155 | if (app_id == static_cast<u32>(AppletId::AnyLibraryApplet)) { | 155 | if (app_id == static_cast<u32>(AppletId::AnyLibraryApplet)) { |
| 156 | isRegistered = HLE::Applets::IsLibraryAppletRunning() ? 1 : 0; | 156 | isRegistered = HLE::Applets::IsLibraryAppletRunning() ? true : false; |
| 157 | } else if (auto applet = HLE::Applets::Applet::Get(static_cast<AppletId>(app_id))) { | 157 | } else if (auto applet = HLE::Applets::Applet::Get(static_cast<AppletId>(app_id))) { |
| 158 | isRegistered = 1; // Set to registered | 158 | isRegistered = true; // Set to registered |
| 159 | } | 159 | } |
| 160 | rb.Push(isRegistered); | 160 | rb.Push(isRegistered); |
| 161 | 161 | ||
| @@ -189,7 +189,7 @@ void SendParameter(Service::Interface* self) { | |||
| 189 | 189 | ||
| 190 | if (dest_applet == nullptr) { | 190 | if (dest_applet == nullptr) { |
| 191 | LOG_ERROR(Service_APT, "Unknown applet id=0x%08X", dst_app_id); | 191 | LOG_ERROR(Service_APT, "Unknown applet id=0x%08X", dst_app_id); |
| 192 | rb.Push(u32(-1)); // TODO(Subv): Find the right error code | 192 | rb.Push<u32>(-1); // TODO(Subv): Find the right error code |
| 193 | return; | 193 | return; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| @@ -227,7 +227,7 @@ void ReceiveParameter(Service::Interface* self) { | |||
| 227 | rb.Push(next_parameter.sender_id); | 227 | rb.Push(next_parameter.sender_id); |
| 228 | rb.Push(next_parameter.signal); // Signal type | 228 | rb.Push(next_parameter.signal); // Signal type |
| 229 | ASSERT_MSG(next_parameter.buffer.size() <= buffer_size, "Input static buffer is too small !"); | 229 | ASSERT_MSG(next_parameter.buffer.size() <= buffer_size, "Input static buffer is too small !"); |
| 230 | rb.Push(u32(next_parameter.buffer.size())); // Parameter buffer size | 230 | rb.Push(static_cast<u32>(next_parameter.buffer.size())); // Parameter buffer size |
| 231 | 231 | ||
| 232 | rb.PushMoveHandles((next_parameter.object != nullptr) | 232 | rb.PushMoveHandles((next_parameter.object != nullptr) |
| 233 | ? Kernel::g_handle_table.Create(next_parameter.object).MoveFrom() | 233 | ? Kernel::g_handle_table.Create(next_parameter.object).MoveFrom() |
| @@ -256,7 +256,7 @@ void GlanceParameter(Service::Interface* self) { | |||
| 256 | rb.Push(next_parameter.sender_id); | 256 | rb.Push(next_parameter.sender_id); |
| 257 | rb.Push(next_parameter.signal); // Signal type | 257 | rb.Push(next_parameter.signal); // Signal type |
| 258 | ASSERT_MSG(next_parameter.buffer.size() <= buffer_size, "Input static buffer is too small !"); | 258 | ASSERT_MSG(next_parameter.buffer.size() <= buffer_size, "Input static buffer is too small !"); |
| 259 | rb.Push(u32(next_parameter.buffer.size())); // Parameter buffer size | 259 | rb.Push(static_cast<u32>(next_parameter.buffer.size())); // Parameter buffer size |
| 260 | 260 | ||
| 261 | rb.PushCopyHandles((next_parameter.object != nullptr) | 261 | rb.PushCopyHandles((next_parameter.object != nullptr) |
| 262 | ? Kernel::g_handle_table.Create(next_parameter.object).MoveFrom() | 262 | ? Kernel::g_handle_table.Create(next_parameter.object).MoveFrom() |
| @@ -277,7 +277,7 @@ void CancelParameter(Service::Interface* self) { | |||
| 277 | u32 receiver_appid = rp.Pop<u32>(); | 277 | u32 receiver_appid = rp.Pop<u32>(); |
| 278 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | 278 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); |
| 279 | rb.Push(RESULT_SUCCESS); // No error | 279 | rb.Push(RESULT_SUCCESS); // No error |
| 280 | rb.Push(u32(1)); // Set to Success | 280 | rb.Push(true); // Set to Success |
| 281 | 281 | ||
| 282 | LOG_WARNING(Service_APT, "(STUBBED) called check_sender=0x%08X, sender_appid=0x%08X, " | 282 | LOG_WARNING(Service_APT, "(STUBBED) called check_sender=0x%08X, sender_appid=0x%08X, " |
| 283 | "check_receiver=0x%08X, receiver_appid=0x%08X", | 283 | "check_receiver=0x%08X, receiver_appid=0x%08X", |
| @@ -414,7 +414,7 @@ void StartLibraryApplet(Service::Interface* self) { | |||
| 414 | if (applet == nullptr) { | 414 | if (applet == nullptr) { |
| 415 | LOG_ERROR(Service_APT, "unknown applet id=%08X", applet_id); | 415 | LOG_ERROR(Service_APT, "unknown applet id=%08X", applet_id); |
| 416 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0, false); | 416 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0, false); |
| 417 | rb.Push(u32(-1)); // TODO(Subv): Find the right error code | 417 | rb.Push<u32>(-1); // TODO(Subv): Find the right error code |
| 418 | return; | 418 | return; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| @@ -433,10 +433,10 @@ void StartLibraryApplet(Service::Interface* self) { | |||
| 433 | 433 | ||
| 434 | void CancelLibraryApplet(Service::Interface* self) { | 434 | void CancelLibraryApplet(Service::Interface* self) { |
| 435 | IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x3B, 1, 0); // 0x003B0040 | 435 | IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x3B, 1, 0); // 0x003B0040 |
| 436 | u32 exiting = rp.Pop<u32>() & 0xFF; | 436 | bool exiting = rp.Pop<bool>(); |
| 437 | 437 | ||
| 438 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | 438 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); |
| 439 | rb.Push(u32(1)); | 439 | rb.Push<u32>(1); |
| 440 | 440 | ||
| 441 | LOG_WARNING(Service_APT, "(STUBBED) called exiting=%u", exiting); | 441 | LOG_WARNING(Service_APT, "(STUBBED) called exiting=%u", exiting); |
| 442 | } | 442 | } |
| @@ -473,9 +473,9 @@ void GetAppletInfo(Service::Interface* self) { | |||
| 473 | u64 titileId = 0; | 473 | u64 titileId = 0; |
| 474 | rb.Push(titileId); | 474 | rb.Push(titileId); |
| 475 | rb.Push(static_cast<u32>(Service::FS::MediaType::NAND)); | 475 | rb.Push(static_cast<u32>(Service::FS::MediaType::NAND)); |
| 476 | rb.Push(u64(1)); // Registered | 476 | rb.Push(true); // Registered |
| 477 | rb.Push(u64(1)); // Loaded | 477 | rb.Push(true); // Loaded |
| 478 | rb.Push(u64(0)); // Applet Attributes | 478 | rb.Push<u32>(0); // Applet Attributes |
| 479 | } else { | 479 | } else { |
| 480 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); | 480 | IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); |
| 481 | rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Applet, ErrorSummary::NotFound, | 481 | rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Applet, ErrorSummary::NotFound, |
| @@ -514,7 +514,7 @@ void GetStartupArgument(Service::Interface* self) { | |||
| 514 | 514 | ||
| 515 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | 515 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); |
| 516 | rb.Push(RESULT_SUCCESS); | 516 | rb.Push(RESULT_SUCCESS); |
| 517 | rb.Push(u32(0)); | 517 | rb.Push<u32>(0); |
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | void Wrap(Service::Interface* self) { | 520 | void Wrap(Service::Interface* self) { |
| @@ -624,7 +624,7 @@ void CheckNew3DSApp(Service::Interface* self) { | |||
| 624 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | 624 | IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); |
| 625 | if (unknown_ns_state_field) { | 625 | if (unknown_ns_state_field) { |
| 626 | rb.Push(RESULT_SUCCESS); | 626 | rb.Push(RESULT_SUCCESS); |
| 627 | rb.Push(u32(0)); | 627 | rb.Push<u32>(0); |
| 628 | } else { | 628 | } else { |
| 629 | PTM::CheckNew3DS(rb); | 629 | PTM::CheckNew3DS(rb); |
| 630 | } | 630 | } |
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp index cfea62962..c0837d49d 100644 --- a/src/core/hle/service/y2r_u.cpp +++ b/src/core/hle/service/y2r_u.cpp | |||
| @@ -191,7 +191,7 @@ static void SetSpacialDithering(Interface* self) { | |||
| 191 | static void GetSpacialDithering(Interface* self) { | 191 | static void GetSpacialDithering(Interface* self) { |
| 192 | IPC::RequestBuilder rb(Kernel::GetCommandBuffer(), 0xA, 2, 0); | 192 | IPC::RequestBuilder rb(Kernel::GetCommandBuffer(), 0xA, 2, 0); |
| 193 | rb.Push(RESULT_SUCCESS); | 193 | rb.Push(RESULT_SUCCESS); |
| 194 | rb.Push(bool(spacial_dithering_enabled)); | 194 | rb.Push(spacial_dithering_enabled != 0); |
| 195 | 195 | ||
| 196 | LOG_WARNING(Service_Y2R, "(STUBBED) called"); | 196 | LOG_WARNING(Service_Y2R, "(STUBBED) called"); |
| 197 | } | 197 | } |