From 83645a392bbd9c45eae20cbcfee4c3dbdb5c6074 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 04:41:35 +0000 Subject: [PATCH] Decompile fn_17330 (Singleton::GetInstance) Batch #4731 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_17330 Singleton::GetInstance: logic confirmed by peer review Peer-reviewed-by: youko, Qwenkler3.8 Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Configuration/ServiceOptions.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index 1ed996b5..b142d2a5 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -728,3 +728,18 @@ void ApplyServiceOptionAndSnap(int id, unsigned char value, bool notify, int ena g_windowMgr.UpdateSnapRectangles(); } + +// GLOBAL: gl_24912 +template <> +CGameSettingsMgr* Singleton::s_instance = nullptr; + +// OFFSET: 0x00AB1040 +// FUNCTION: fn_17330 +template <> +CGameSettingsMgr* Singleton::GetInstance() { + if (!s_instance) { + s_instance = new (std::nothrow) CGameSettingsMgr; + } + + return s_instance; +}