From c54b12181dc09bedf9709efae14c23e2dace2663 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Mon, 12 Feb 2024 16:49:14 -0600 Subject: [PATCH] clang format --- src/core/hle/service/acc/profile_manager.cpp | 2 +- .../hle/service/am/application_creator.cpp | 2 +- src/core/hle/service/am/application_creator.h | 4 ++-- .../service/am/cradle_firmware_updater.cpp | 4 ++-- .../service/am/global_state_controller.cpp | 4 ++-- src/core/hle/service/audio/audctl.cpp | 3 +-- src/core/hle/service/audio/audctl.h | 2 +- src/core/hle/service/btdrv/btdrv.cpp | 4 ++-- src/core/hle/service/btm/btm.cpp | 8 ++++--- src/core/hle/service/erpt/erpt.cpp | 2 +- src/core/hle/service/glue/glue_manager.cpp | 1 - .../hle/service/hid/hid_system_server.cpp | 2 -- src/core/hle/service/nifm/nifm.cpp | 1 - src/core/hle/service/npns/npns.cpp | 8 +++---- src/core/hle/service/ns/ns.cpp | 24 +++++++++++++++++-- src/core/hle/service/vi/vi.cpp | 10 -------- .../touch_screen/gesture_handler.cpp | 2 +- src/yuzu/game_list_worker.cpp | 2 +- src/yuzu/main.cpp | 2 +- 19 files changed, 47 insertions(+), 40 deletions(-) diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 4ae024128..c9c4a9c0e 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp @@ -330,7 +330,7 @@ bool ProfileManager::GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& /// Returns if the system is allowing user registrations or not bool ProfileManager::CanSystemRegisterUser() const { return true; // TODO(ogniK): Games shouldn't have - // access to user registration, when we + // access to user registration, when we // emulate qlaunch. Update this to dynamically change. } diff --git a/src/core/hle/service/am/application_creator.cpp b/src/core/hle/service/am/application_creator.cpp index 26382caa4..0d902b21e 100644 --- a/src/core/hle/service/am/application_creator.cpp +++ b/src/core/hle/service/am/application_creator.cpp @@ -64,7 +64,7 @@ void IApplicationCreator::CreateApplication(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto application_id = rp.Pop(); - LOG_ERROR(Service_NS, "called, application_id={:x}",application_id); + LOG_ERROR(Service_NS, "called, application_id={:x}", application_id); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(ResultSuccess); diff --git a/src/core/hle/service/am/application_creator.h b/src/core/hle/service/am/application_creator.h index 9916bf5ca..4c8a8cbc6 100644 --- a/src/core/hle/service/am/application_creator.h +++ b/src/core/hle/service/am/application_creator.h @@ -12,7 +12,7 @@ public: explicit IApplicationAccessor(Core::System& system_, u64 application_id); ~IApplicationAccessor() override; - private: +private: }; class IApplicationCreator final : public ServiceFramework { @@ -20,7 +20,7 @@ public: explicit IApplicationCreator(Core::System& system_); ~IApplicationCreator() override; - private: +private: void CreateApplication(HLERequestContext& ctx); }; diff --git a/src/core/hle/service/am/cradle_firmware_updater.cpp b/src/core/hle/service/am/cradle_firmware_updater.cpp index d6c1f07f0..3eac86a39 100644 --- a/src/core/hle/service/am/cradle_firmware_updater.cpp +++ b/src/core/hle/service/am/cradle_firmware_updater.cpp @@ -7,8 +7,8 @@ namespace Service::AM { ICradleFirmwareUpdater::ICradleFirmwareUpdater(Core::System& system_) - : ServiceFramework{system_, "ICradleFirmwareUpdater"}, - service_context{system, "IHomeMenuFunctions"} { + : ServiceFramework{system_, "ICradleFirmwareUpdater"}, service_context{system, + "IHomeMenuFunctions"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "StartUpdate"}, diff --git a/src/core/hle/service/am/global_state_controller.cpp b/src/core/hle/service/am/global_state_controller.cpp index ca2b70dab..5c1932d9a 100644 --- a/src/core/hle/service/am/global_state_controller.cpp +++ b/src/core/hle/service/am/global_state_controller.cpp @@ -8,8 +8,8 @@ namespace Service::AM { IGlobalStateController::IGlobalStateController(Core::System& system_) - : ServiceFramework{system_, "IGlobalStateController"}, - service_context{system_, "IGlobalStateController"} { + : ServiceFramework{system_, "IGlobalStateController"}, service_context{ + system_, "IGlobalStateController"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "RequestToEnterSleep"}, diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index f6e8063c6..057cb6d07 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp @@ -72,8 +72,7 @@ AudCtl::AudCtl(Core::System& system_) RegisterHandlers(functions); - notification_event = - service_context.CreateEvent("audctl:NotificationEvent"); + notification_event = service_context.CreateEvent("audctl:NotificationEvent"); m_set_sys = system.ServiceManager().GetService("set:sys", true); diff --git a/src/core/hle/service/audio/audctl.h b/src/core/hle/service/audio/audctl.h index 481db7dce..8cc7c8838 100644 --- a/src/core/hle/service/audio/audctl.h +++ b/src/core/hle/service/audio/audctl.h @@ -3,8 +3,8 @@ #pragma once -#include "core/hle/service/service.h" #include "core/hle/service/kernel_helpers.h" +#include "core/hle/service/service.h" namespace Core { class System; diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index e4a6864cf..08e7c5bdc 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp @@ -196,8 +196,8 @@ public: RegisterHandlers(functions); } - private: - void EnableRadio(HLERequestContext& ctx) { +private: + void EnableRadio(HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); } diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index aabddb18c..fa95ea14c 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -304,7 +304,8 @@ public: RegisterHandlers(functions); radio_event = service_context.CreateEvent("IBtmSystemCore::RadioEvent"); - audio_device_connection_event = service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent"); + audio_device_connection_event = + service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent"); } private: @@ -362,12 +363,13 @@ private: LOG_WARNING(Service_BTM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); - } void AcquireRadioEvent(HLERequestContext& ctx) { + } + void AcquireRadioEvent(HLERequestContext& ctx) { LOG_ERROR(Service_BTM, "called"); radio_event->Signal(); - IPC::ResponseBuilder rb{ ctx, 3, 1 }; + IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(ResultSuccess); rb.Push(true); rb.PushCopyObjects(radio_event->GetReadableEvent()); diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp index 99ff5885d..4c5b95cec 100644 --- a/src/core/hle/service/erpt/erpt.cpp +++ b/src/core/hle/service/erpt/erpt.cpp @@ -4,8 +4,8 @@ #include #include "core/hle/service/erpt/erpt.h" -#include "core/hle/service/server_manager.h" #include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" #include "core/hle/service/sm/sm.h" diff --git a/src/core/hle/service/glue/glue_manager.cpp b/src/core/hle/service/glue/glue_manager.cpp index ccec09cd1..022acd59e 100644 --- a/src/core/hle/service/glue/glue_manager.cpp +++ b/src/core/hle/service/glue/glue_manager.cpp @@ -43,7 +43,6 @@ Result ARPManager::GetControlProperty(std::vector* out_control_property, u64 *out_control_property = entries.begin()->second.control; return ResultSuccess; - } *out_control_property = iter->second.control; diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp index 40a617fbf..7126a1dcd 100644 --- a/src/core/hle/service/hid/hid_system_server.cpp +++ b/src/core/hle/service/hid/hid_system_server.cpp @@ -12,8 +12,6 @@ #include "hid_core/resources/npad/npad_vibration.h" #include "hid_core/resources/palma/palma.h" #include "hid_core/resources/touch_screen/touch_screen.h" -#include "hid_core/resources/hid_firmware_settings.h" -#include "core/hle/service/set/settings_types.h" namespace Service::HID { diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 0428bf77b..741407526 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -435,7 +435,6 @@ void IGeneralService::EnumerateNetworkProfiles(HLERequestContext& ctx) { rb.Push(0); } - void IGeneralService::RemoveNetworkProfile(HLERequestContext& ctx) { LOG_WARNING(Service_NIFM, "(STUBBED) called"); diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp index 621e98be0..e9ff40b00 100644 --- a/src/core/hle/service/npns/npns.cpp +++ b/src/core/hle/service/npns/npns.cpp @@ -3,12 +3,12 @@ #include +#include "core/hle/kernel/k_event.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/kernel_helpers.h" #include "core/hle/service/npns/npns.h" #include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" -#include "core/hle/service/ipc_helpers.h" -#include "core/hle/kernel/k_event.h" -#include "core/hle/service/kernel_helpers.h" namespace Service::NPNS { @@ -67,7 +67,7 @@ public: get_recieve_event = service_context.CreateEvent("npns:s:GetReceiveEvent"); } - private: +private: void ListenTo(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto progam_id = rp.Pop(); diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 4730cc9bc..5357fd060 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -390,8 +390,9 @@ void IApplicationManagerInterface::ListApplicationRecord(HLERequestContext& ctx) IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - rb.Push(application_records.size()); + rb.Push(static_cast(application_records.size())); } + void IApplicationManagerInterface::GetApplicationRecordUpdateSystemEvent(HLERequestContext& ctx) { LOG_ERROR(Service_NS, "(STUBBED) called"); @@ -489,6 +490,15 @@ void IApplicationManagerInterface::GetApplicationView(HLERequestContext& ctx) { .application_id = data, .unk = 0x70000, .flags = 0x401f17, + .unk_x10 = {}, + .unk_x20 = {}, + .unk_x24 = {}, + .unk_x26 = {}, + .unk_x28 = {}, + .unk_x30 = {}, + .unk_x40 = {}, + .unk_x44 = {}, + .unk_x45 = {}, }); } @@ -513,6 +523,15 @@ void IApplicationManagerInterface::GetApplicationViewWithPromotionInfo(HLEReques .application_id = data, .unk = 0x70000, .flags = 0x401f17, + .unk_x10 = {}, + .unk_x20 = {}, + .unk_x24 = {}, + .unk_x26 = {}, + .unk_x28 = {}, + .unk_x30 = {}, + .unk_x40 = {}, + .unk_x44 = {}, + .unk_x45 = {}, }, .promotion = {}, }); @@ -538,7 +557,8 @@ void IApplicationManagerInterface::GetApplicationRightsOnClient(HLERequestContex const auto application_id = rp.Pop(); const auto uid = rp.PopRaw(); - LOG_ERROR(Service_NS, "(STUBBED) called, flags={}, application_id={:x}, uid={}",flags,application_id,uid.FormattedString()); + LOG_ERROR(Service_NS, "(STUBBED) called, flags={}, application_id={:x}, uid={}", flags, + application_id, uid.FormattedString()); ApplicationRightsOnClient rights{ .application_id = application_id, diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index e7f6df08e..edd017955 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -322,16 +322,6 @@ private: } void ListDisplayModes(HLERequestContext& ctx) { - struct DisplayInfo { - u8 unknownString[0x40]; - bool unknownBool; - INSERT_PADDING_BYTES(0x7); - u64 unknownU64_1; - u64 unknownU64_2; - u64 unknownU64_3; - }; - static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo is an invalid size"); - LOG_WARNING(Service_VI, "(STUBBED) called"); std::vector display_modes(1); diff --git a/src/hid_core/resources/touch_screen/gesture_handler.cpp b/src/hid_core/resources/touch_screen/gesture_handler.cpp index 93c26c769..4fcaf6ecf 100644 --- a/src/hid_core/resources/touch_screen/gesture_handler.cpp +++ b/src/hid_core/resources/touch_screen/gesture_handler.cpp @@ -57,7 +57,7 @@ bool GestureHandler::NeedsUpdate() { for (size_t id = 0; id < MaxPoints; id++) { if (gesture.points[id] != last_gesture.points[id]) { return true; -} + } } // Update on press and hold event after 0.5 seconds diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index 196d4d236..755631dd3 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -14,7 +14,6 @@ #include "common/fs/fs.h" #include "common/fs/path_util.h" #include "core/core.h" -#include "core/hle/service/glue/glue_manager.h" #include "core/file_sys/card_image.h" #include "core/file_sys/content_archive.h" #include "core/file_sys/control_metadata.h" @@ -23,6 +22,7 @@ #include "core/file_sys/patch_manager.h" #include "core/file_sys/registered_cache.h" #include "core/file_sys/submission_package.h" +#include "core/hle/service/glue/glue_manager.h" #include "core/loader/loader.h" #include "yuzu/compatibility_list.h" #include "yuzu/game_list.h" diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 711a26e6a..0fdab3cef 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1629,7 +1629,7 @@ void GMainWindow::UpdateMenuState() { ui->action_Load_Cabinet_Restorer, ui->action_Load_Cabinet_Formatter, ui->action_Load_Mii_Edit, - ui->action_Load_QLaunch, + ui->action_Load_QLaunch, ui->action_Open_Controller_Menu}; for (QAction* action : running_actions) {