소스 검색

fix(client): retire the experimental banner detour

Stop installing and uninstalling the native orbit-banner hook that was used during protocol discovery and could interfere with client startup or shutdown.

Orbit and roster appearance now flow through the versioned Family 0/3 Queuez updates instead. Keep one bounded debug record after the guarded service-123 handler to diagnose client update acceptance without mutating native behavior.
Thomas Shields 3 주 전
부모
커밋
13144833b4

+ 20 - 1
Sunrise/src/client/hooks/queuez/svc123_null_payload_guard.cpp

@@ -2,6 +2,7 @@
 #include <atomic>
 #include <cstddef>
 #include <cstdint>
+#include <cstdio>
 #include <cstring>
 #include <string_view>
 
@@ -70,7 +71,25 @@ __declspec(noinline) char __fastcall handler(void* self,
         return kNotHandled;
     }
     const Handler original = g_original.load(std::memory_order_acquire);
-    return original != nullptr ? original(self, context, message) : kNotHandled;
+    const char result = original != nullptr ? original(self, context, message) : kNotHandled;
+    std::uint32_t messageId = 0;
+    if (message != nullptr) {
+        std::memcpy(&messageId, message + MessageLayout::id, sizeof messageId);
+    }
+    std::array<char, core::log::kLineCapacity> line{};
+    const int count = std::snprintf(line.data(),
+                                    line.size(),
+                                    "ev=queuez stage=native_handler result=%d message_id=%u "
+                                    "payload=0x%llX",
+                                    static_cast<int>(result),
+                                    messageId,
+                                    static_cast<unsigned long long>(payload));
+    if (count > 0) {
+        core::log::write(core::log::Channel::client,
+                         core::log::Level::debug,
+                         {line.data(), static_cast<std::size_t>(count)});
+    }
+    return result;
 }
 
 } // namespace

+ 0 - 4
Sunrise/src/client/runtime/client_hook_activation.cpp

@@ -12,7 +12,6 @@
 #include "../content/investment/worker.h"
 #include "../executable/image.h"
 #include "../hooks/assert_handler/assert_handler_lifecycle.h"
-#include "../hooks/banner/banner_hook_lifecycle.h"
 #include "../hooks/bitmap/bitmap_hook_lifecycle.h"
 #include "../hooks/bootflow/bootflow_hook_lifecycle.h"
 #include "../hooks/config_getter/config_getter_lifecycle.h"
@@ -162,9 +161,6 @@ void clear_game_targets() noexcept {
     // The bitmap reference guard puts the none sentinel in place of a reference outside tag
     // space. Without it the widget's stored-reference reader faults.
     (void)hooks::bitmap::install();
-    // The orbit banner component ships unbound, so its update body never runs and it draws the
-    // constructor's values.
-    (void)hooks::banner::install();
     content::investment::worker::activate();
     return true;
 }

+ 0 - 4
Sunrise/src/client/runtime/client_runtime_lifecycle.cpp

@@ -1,7 +1,6 @@
 #include "../../core/logging/log.h"
 #include "../content/investment/worker.h"
 #include "../hooks/assert_handler/assert_handler_lifecycle.h"
-#include "../hooks/banner/banner_hook_lifecycle.h"
 #include "../hooks/bitmap/bitmap_hook_lifecycle.h"
 #include "../hooks/bootflow/bootflow_hook_lifecycle.h"
 #include "../hooks/config_getter/config_getter_lifecycle.h"
@@ -48,9 +47,6 @@ bool shutdown() noexcept {
         ReleaseSRWLockExclusive(&runtime::g_lock);
         return false;
     }
-    // Detached before the other game hooks because each fix is a plain one-site detour with
-    // no shared target state to hand back.
-    hooks::banner::uninstall();
     hooks::bitmap::uninstall();
     hooks::bootflow::uninstall();
     hooks::teleport::uninstall();