From 5adaa5b0f7e19df9bf9dbd883fe921dfe4952125 Mon Sep 17 00:00:00 2001 From: Feng Chen Date: Mon, 14 Sep 2026 16:44:52 +0200 Subject: [PATCH] [core] Fix MSVC handler table initialization (#4421) Construct FunctionInfoTyped at runtime instead of forcing constant initialization. This avoids malformed static handler tables when MSVC converts typed member-function pointers, particularly for entries with null handlers. - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4421 Reviewed-by: MaranBr Reviewed-by: lizzie --- src/core/hle/service/service.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index df56b69847..ea98897e79 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -143,7 +143,7 @@ protected: /// @param expected_header_ request header in the command buffer which will trigger dispatch to this handler /// @param handler_callback_ member function in this service which will be called to handle the request /// @param name_ human-friendly name for the request. Used mostly for logging purposes. - constexpr FunctionInfoTyped(u32 expected_header_, HandlerFnP handler_callback_, const char* name_) + FunctionInfoTyped(u32 expected_header_, HandlerFnP handler_callback_, const char* name_) : FunctionInfoBase{expected_header_, HandlerFnP(handler_callback_), name_} {} }; using FunctionInfo = FunctionInfoTyped;