Browse Source

service/am: Sort ISelfController's member functions according to table order

Makes the declaration order of the handling functions consistent with
the handler table itself.
Lioncash 7 years ago
parent
commit
96d518a59f
2 changed files with 36 additions and 36 deletions
  1. 30 30
      src/core/hle/service/am/am.cpp
  2. 6 6
      src/core/hle/service/am/am.h

+ 30 - 30
src/core/hle/service/am/am.cpp

@@ -285,39 +285,28 @@ ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger
 
 
 ISelfController::~ISelfController() = default;
 ISelfController::~ISelfController() = default;
 
 
-void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
-    // Takes 3 input u8s with each field located immediately after the previous
-    // u8, these are bool flags. No output.
+void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
     LOG_WARNING(Service_AM, "(STUBBED) called");
     LOG_WARNING(Service_AM, "(STUBBED) called");
 
 
-    IPC::RequestParser rp{ctx};
-
-    struct FocusHandlingModeParams {
-        u8 unknown0;
-        u8 unknown1;
-        u8 unknown2;
-    };
-    auto flags = rp.PopRaw<FocusHandlingModeParams>();
-
     IPC::ResponseBuilder rb{ctx, 2};
     IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
 }
 }
 
 
-void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) {
+void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
     LOG_WARNING(Service_AM, "(STUBBED) called");
     LOG_WARNING(Service_AM, "(STUBBED) called");
 
 
     IPC::ResponseBuilder rb{ctx, 2};
     IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
 }
 }
 
 
-void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) {
-    IPC::RequestParser rp{ctx};
+void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) {
+    LOG_WARNING(Service_AM, "(STUBBED) called");
 
 
-    bool flag = rp.Pop<bool>();
-    LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag);
+    launchable_event.writable->Signal();
 
 
-    IPC::ResponseBuilder rb{ctx, 2};
+    IPC::ResponseBuilder rb{ctx, 2, 1};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
+    rb.PushCopyObjects(launchable_event.readable);
 }
 }
 
 
 void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) {
 void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) {
@@ -337,40 +326,51 @@ void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestCont
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
 }
 }
 
 
-void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) {
-    // Takes 3 input u8s with each field located immediately after the previous
-    // u8, these are bool flags. No output.
+void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) {
     IPC::RequestParser rp{ctx};
     IPC::RequestParser rp{ctx};
 
 
-    bool enabled = rp.Pop<bool>();
-    LOG_WARNING(Service_AM, "(STUBBED) called enabled={}", enabled);
+    bool flag = rp.Pop<bool>();
+    LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag);
 
 
     IPC::ResponseBuilder rb{ctx, 2};
     IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
 }
 }
 
 
-void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
+void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
+    // Takes 3 input u8s with each field located immediately after the previous
+    // u8, these are bool flags. No output.
     LOG_WARNING(Service_AM, "(STUBBED) called");
     LOG_WARNING(Service_AM, "(STUBBED) called");
 
 
+    IPC::RequestParser rp{ctx};
+
+    struct FocusHandlingModeParams {
+        u8 unknown0;
+        u8 unknown1;
+        u8 unknown2;
+    };
+    auto flags = rp.PopRaw<FocusHandlingModeParams>();
+
     IPC::ResponseBuilder rb{ctx, 2};
     IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
 }
 }
 
 
-void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
+void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) {
     LOG_WARNING(Service_AM, "(STUBBED) called");
     LOG_WARNING(Service_AM, "(STUBBED) called");
 
 
     IPC::ResponseBuilder rb{ctx, 2};
     IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
 }
 }
 
 
-void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) {
-    LOG_WARNING(Service_AM, "(STUBBED) called");
+void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) {
+    // Takes 3 input u8s with each field located immediately after the previous
+    // u8, these are bool flags. No output.
+    IPC::RequestParser rp{ctx};
 
 
-    launchable_event.writable->Signal();
+    bool enabled = rp.Pop<bool>();
+    LOG_WARNING(Service_AM, "(STUBBED) called enabled={}", enabled);
 
 
-    IPC::ResponseBuilder rb{ctx, 2, 1};
+    IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
-    rb.PushCopyObjects(launchable_event.readable);
 }
 }
 
 
 void ISelfController::SetScreenShotImageOrientation(Kernel::HLERequestContext& ctx) {
 void ISelfController::SetScreenShotImageOrientation(Kernel::HLERequestContext& ctx) {

+ 6 - 6
src/core/hle/service/am/am.h

@@ -117,17 +117,17 @@ public:
     ~ISelfController() override;
     ~ISelfController() override;
 
 
 private:
 private:
-    void SetFocusHandlingMode(Kernel::HLERequestContext& ctx);
-    void SetRestartMessageEnabled(Kernel::HLERequestContext& ctx);
-    void SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx);
-    void SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx);
-    void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx);
     void LockExit(Kernel::HLERequestContext& ctx);
     void LockExit(Kernel::HLERequestContext& ctx);
     void UnlockExit(Kernel::HLERequestContext& ctx);
     void UnlockExit(Kernel::HLERequestContext& ctx);
     void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx);
     void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx);
+    void SetScreenShotPermission(Kernel::HLERequestContext& ctx);
+    void SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx);
+    void SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx);
+    void SetFocusHandlingMode(Kernel::HLERequestContext& ctx);
+    void SetRestartMessageEnabled(Kernel::HLERequestContext& ctx);
+    void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx);
     void SetScreenShotImageOrientation(Kernel::HLERequestContext& ctx);
     void SetScreenShotImageOrientation(Kernel::HLERequestContext& ctx);
     void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
     void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
-    void SetScreenShotPermission(Kernel::HLERequestContext& ctx);
     void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
     void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
     void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
     void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
     void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
     void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);