diff --git a/Source/Contents/Async/AsyncWorkMgr.cpp b/Source/Contents/Async/AsyncWorkMgr.cpp index 5a8bac3b6..5ad3608d9 100644 --- a/Source/Contents/Async/AsyncWorkMgr.cpp +++ b/Source/Contents/Async/AsyncWorkMgr.cpp @@ -98,13 +98,13 @@ void CAsyncWorkMgr::SaveAccount(std::uint32_t accountId, std::string world, std: // FUNCTION: fn_02501 void CAsyncWorkMgr::ChangePartyMaster( std::uint32_t accountId, std::uint32_t characterId, std::string characterName, std::uint32_t targetAccountId, std::uint32_t targetCharacterId, - std::string targetName, std::string world, std::string url, std::string token, WindowManagerWindows& windows + std::string targetName, std::string world, std::string url, std::string token ) { NAsyncWorkPtr work(this->m_pools, "Change_PartyMaster"); if (work.Get()) { static_cast(work.Get()) - ->Bind(accountId, characterId, characterName, targetAccountId, targetCharacterId, targetName, world, url, token, windows); + ->Bind(accountId, characterId, characterName, targetAccountId, targetCharacterId, targetName, world, url, token); this->Submit(work); } } @@ -136,12 +136,12 @@ void CAsyncWorkMgr::SaveCharacter(std::uint32_t accountId, std::uint32_t charact // OFFSET: 0x00574430 // FUNCTION: fn_02504 void CAsyncWorkMgr::DownloadEmblem( - std::string url, std::uint32_t accountId, std::string token, std::string world, std::uint32_t guildId, std::uint32_t version, CConnection& connection + std::string url, std::uint32_t accountId, std::string token, std::string world, std::uint32_t guildId, std::uint32_t version ) { NAsyncWorkPtr work(this->m_pools, "Emblem_Download"); if (work.Get()) { - static_cast(work.Get())->Bind(url, accountId, token, world, guildId, version, connection); + static_cast(work.Get())->Bind(url, accountId, token, world, guildId, version); this->Submit(work); } } @@ -159,13 +159,11 @@ void CAsyncWorkMgr::UploadEmblem(std::string url, std::uint32_t accountId, std:: // OFFSET: 0x005746D0 // FUNCTION: fn_02506 -void CAsyncWorkMgr::LoadMyParty( - std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token, WindowManagerWindows& windows -) { +void CAsyncWorkMgr::LoadMyParty(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token) { NAsyncWorkPtr work(this->m_pools, "MyParty_Load"); if (work.Get()) { - static_cast(work.Get())->Bind(accountId, characterId, world, url, token, windows); + static_cast(work.Get())->Bind(accountId, characterId, world, url, token); this->Submit(work); } } diff --git a/Source/Contents/Async/AsyncWorkMgr.h b/Source/Contents/Async/AsyncWorkMgr.h index c9f7df706..94894393b 100644 --- a/Source/Contents/Async/AsyncWorkMgr.h +++ b/Source/Contents/Async/AsyncWorkMgr.h @@ -21,15 +21,13 @@ public: void SaveAccount(std::uint32_t accountId, std::string world, std::string url, std::string token, std::string data); void ChangePartyMaster( std::uint32_t accountId, std::uint32_t characterId, std::string characterName, std::uint32_t targetAccountId, std::uint32_t targetCharacterId, - std::string targetName, std::string world, std::string url, std::string token, WindowManagerWindows& windows + std::string targetName, std::string world, std::string url, std::string token ); void LoadCharacter(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token); void SaveCharacter(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token, std::string data); - void DownloadEmblem( - std::string url, std::uint32_t accountId, std::string token, std::string world, std::uint32_t guildId, std::uint32_t version, CConnection& connection - ); + void DownloadEmblem(std::string url, std::uint32_t accountId, std::string token, std::string world, std::uint32_t guildId, std::uint32_t version); void UploadEmblem(std::string url, std::uint32_t accountId, std::string token, std::string world, std::uint32_t guildId, std::string path); - void LoadMyParty(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token, WindowManagerWindows& windows); + void LoadMyParty(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token); void LoadPartyInfo( std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token, std::uint32_t queryAccountId ); diff --git a/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp b/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp index e10183889..7b89ccfe8 100644 --- a/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp +++ b/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp @@ -32,7 +32,7 @@ namespace { // FUNCTION: fn_03963 CEmblemDataDownloadAsyncWork::CEmblemDataDownloadAsyncWork() : NAsyncWork("Emblem_Download"), m_accountId(0), m_guildId(0), m_version(0), m_responseCode(500), - m_diagnostic(false, std::string(DecryptName<0xC52FB5FBB94FF917ULL>({0x62, 0x97, 0x24, 0xD7, 0x8C, 0xDA, 0x41, 0xC5})), sourceFile, 29), m_connection(nullptr) { + m_diagnostic(false, std::string(DecryptName<0xC52FB5FBB94FF917ULL>({0x62, 0x97, 0x24, 0xD7, 0x8C, 0xDA, 0x41, 0xC5})), sourceFile, 29) { } // INLINED @@ -46,7 +46,7 @@ void CEmblemDataDownloadAsyncWork::Reset() { // OFFSET: 0x005EA0D0 // FUNCTION: fn_03965 void CEmblemDataDownloadAsyncWork::Bind( - std::string url, std::uint32_t accountId, std::string token, std::string accountName, std::uint32_t guildId, std::uint32_t version, CConnection& connection + std::string url, std::uint32_t accountId, std::string token, std::string accountName, std::uint32_t guildId, std::uint32_t version ) { this->m_group = timeGetTime(); this->m_key = 0; @@ -58,7 +58,6 @@ void CEmblemDataDownloadAsyncWork::Bind( this->m_version = version; AsyncDiagnostic diagnostic = Diagnostic(false, DecryptName<0x93E7A3A1F587CDC5ULL>({0xB0, 0xA3, 0xEC, 0x9B, 0xD6, 0xCC, 0x89, 0x93}), 57); this->m_diagnostic.MoveFrom(diagnostic); - this->m_connection = &connection; } // OFFSET: 0x005EA430 diff --git a/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.h b/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.h index 6a77c493f..7970524ad 100644 --- a/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.h +++ b/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.h @@ -4,7 +4,8 @@ #include "Utility/Async/AsyncDiagnostic.h" #include "Utility/Async/NAsyncWork.h" -class CConnection; +#include +#include class CEmblemDataDownloadAsyncWork : public NAsyncWork { public: @@ -13,9 +14,7 @@ public: void Reset() override; bool Execute() override; void Complete() override; - void Bind( - std::string url, std::uint32_t accountId, std::string token, std::string accountName, std::uint32_t guildId, std::uint32_t version, CConnection& connection - ); + void Bind(std::string url, std::uint32_t accountId, std::string token, std::string accountName, std::uint32_t guildId, std::uint32_t version); protected: /* 0028 */ std::string m_url; @@ -27,11 +26,10 @@ protected: /* 007C */ std::string m_response; /* 0094 */ int m_responseCode; /* 0098 */ AsyncDiagnostic m_diagnostic; - CConnection* m_connection; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(sizeof(CEmblemDataDownloadAsyncWork) == 212); +static_assert(sizeof(CEmblemDataDownloadAsyncWork) == 208); #endif #endif diff --git a/Source/Contents/Emblems/EmblemDataMgr.cpp b/Source/Contents/Emblems/EmblemDataMgr.cpp index 571680bf2..57366020c 100644 --- a/Source/Contents/Emblems/EmblemDataMgr.cpp +++ b/Source/Contents/Emblems/EmblemDataMgr.cpp @@ -75,9 +75,7 @@ void CEmblemDataMgr::RefreshUrls(LuaScript& settings, LuaScript& tables, const c // FUNCTION: fn_03972 void CEmblemDataMgr::Download(std::uint32_t guildId, std::uint32_t version) { const std::string token(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16); - g_asyncWorkMgr->DownloadEmblem( - this->m_downloadUrl, g_session.m_aid, token, g_session.m_accountName, guildId, version, GetRagConnection() - ); + g_asyncWorkMgr->DownloadEmblem(this->m_downloadUrl, g_session.m_aid, token, g_session.m_accountName, guildId, version); } // OFFSET: 0x005EB410 diff --git a/Source/Contents/Party/AdventurerAgencyMgr.h b/Source/Contents/Party/AdventurerAgencyMgr.h index d9373a424..616e86c53 100644 --- a/Source/Contents/Party/AdventurerAgencyMgr.h +++ b/Source/Contents/Party/AdventurerAgencyMgr.h @@ -24,9 +24,9 @@ public: void RequestRegistration(const CAdvenPartyInfo& info); void RequestStop(std::uint32_t masterAccountId); void RequestStop(); - void CompleteChangeMaster(AsyncDiagnostic diagnostic, std::string response, WindowManagerWindows& windows); + void CompleteChangeMaster(AsyncDiagnostic diagnostic, std::string response); void CompleteList(AsyncDiagnostic diagnostic, std::string response, WindowManagerWindows& windows); - void CompleteMyParty(AsyncDiagnostic diagnostic, std::string response, WindowManagerWindows& windows); + void CompleteMyParty(AsyncDiagnostic diagnostic, std::string response); void CompletePartyInfo(AsyncDiagnostic diagnostic, std::string response); void CompleteRegistration(AsyncDiagnostic diagnostic, std::string response); void CompleteStopRecruiting(AsyncDiagnostic diagnostic, std::string response); diff --git a/Source/Contents/Party/AgencyRequests.cpp b/Source/Contents/Party/AgencyRequests.cpp index fe7db5a75..93267bce7 100644 --- a/Source/Contents/Party/AgencyRequests.cpp +++ b/Source/Contents/Party/AgencyRequests.cpp @@ -10,7 +10,7 @@ void CAdventurerAgencyMgr::RequestChangeMaster(std::uint32_t targetAccountId, st const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->ChangePartyMaster( account, character, std::string(g_session.DecodePlayerName()), targetAccountId, targetCharacterId, targetName, std::string(g_session.m_accountName.c_str()), - this->ServiceUrl(6), std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), g_windowMgr + this->ServiceUrl(6), std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16) ); ++this->pending; } @@ -22,7 +22,7 @@ void CAdventurerAgencyMgr::RequestMyParty() { const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->LoadMyParty( account, character, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(5), - std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), g_windowMgr + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16) ); ++this->pending; } diff --git a/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp b/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp index c5af6378e..3f88bfa97 100644 --- a/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp +++ b/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp @@ -39,7 +39,7 @@ namespace { // FUNCTION: fn_03677 CChangePartyMasterAsyncWork::CChangePartyMasterAsyncWork() : NAsyncWork("Change_PartyMaster"), m_accountId(0), m_characterId(0), m_token(""), m_worldName(""), m_response(""), m_url(""), - m_diagnostic(false, std::string(DecryptName<0x2FF3C5036D070127ULL>({0x52, 0x6F, 0x6C, 0x03, 0x74, 0xAA, 0x9D, 0x2F})), sourceFile, 27), m_windows(nullptr) { + m_diagnostic(false, std::string(DecryptName<0x2FF3C5036D070127ULL>({0x52, 0x6F, 0x6C, 0x03, 0x74, 0xAA, 0x9D, 0x2F})), sourceFile, 27) { } // INLINED @@ -54,7 +54,7 @@ void CChangePartyMasterAsyncWork::Reset() { // FUNCTION: fn_03680 void CChangePartyMasterAsyncWork::Bind( std::uint32_t accountId, std::uint32_t characterId, std::string characterName, std::uint32_t targetAccountId, std::uint32_t targetCharacterId, - std::string targetName, std::string worldName, std::string url, std::string token, WindowManagerWindows& windows + std::string targetName, std::string worldName, std::string url, std::string token ) { this->m_group = timeGetTime(); this->m_accountId = accountId; @@ -69,7 +69,6 @@ void CChangePartyMasterAsyncWork::Bind( this->m_token = token; AsyncDiagnostic diagnostic = Diagnostic(false, DecryptName<0x17359BF953C367B3ULL>({0xC6, 0x09, 0xA8, 0x3D, 0x8E, 0xF4, 0x5B, 0x17}), 55); this->m_diagnostic.MoveFrom(diagnostic); - this->m_windows = &windows; } // OFFSET: 0x005CE150 @@ -109,7 +108,7 @@ bool CChangePartyMasterAsyncWork::Execute() { // OFFSET: 0x005CE090 // FUNCTION: fn_03682 void CChangePartyMasterAsyncWork::Complete() { - g_adventurerAgencyMgr->CompleteChangeMaster(this->m_diagnostic, this->m_response, *this->m_windows); + g_adventurerAgencyMgr->CompleteChangeMaster(this->m_diagnostic, this->m_response); } template void std::deque::push_back(CChangePartyMasterAsyncWork*&&); diff --git a/Source/Contents/Party/ChangePartyMasterAsyncWork.h b/Source/Contents/Party/ChangePartyMasterAsyncWork.h index a12158996..a611a8715 100644 --- a/Source/Contents/Party/ChangePartyMasterAsyncWork.h +++ b/Source/Contents/Party/ChangePartyMasterAsyncWork.h @@ -4,7 +4,8 @@ #include "Utility/Async/AsyncDiagnostic.h" #include "Utility/Async/NAsyncWork.h" -#include "UI/Window/WindowManagerWindows.h" +#include +#include class CChangePartyMasterAsyncWork : public NAsyncWork { public: @@ -15,7 +16,7 @@ public: void Complete() override; void Bind( std::uint32_t accountId, std::uint32_t characterId, std::string characterName, std::uint32_t targetAccountId, std::uint32_t targetCharacterId, - std::string targetName, std::string worldName, std::string url, std::string token, WindowManagerWindows& windows + std::string targetName, std::string worldName, std::string url, std::string token ); protected: @@ -30,11 +31,10 @@ protected: /* 0098 */ std::string m_response; /* 00B0 */ std::string m_url; /* 00C8 */ AsyncDiagnostic m_diagnostic; - WindowManagerWindows* m_windows; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(sizeof(CChangePartyMasterAsyncWork) == 260); +static_assert(sizeof(CChangePartyMasterAsyncWork) == 256); #endif #endif diff --git a/Source/Contents/Party/ChangePartyMasterCompletion.cpp b/Source/Contents/Party/ChangePartyMasterCompletion.cpp index a0c225152..c18908e4b 100644 --- a/Source/Contents/Party/ChangePartyMasterCompletion.cpp +++ b/Source/Contents/Party/ChangePartyMasterCompletion.cpp @@ -2,7 +2,7 @@ #include "UI/Window/UIEnums.h" #include "Contents/Party/AdventurerAgencyMgr.h" #include "UI/Window/UIWindow.h" -#include "UI/Window/WindowManagerWindows.h" +#include "UI/Window/UIWindowMgr.h" #include "Utility/Async/AsyncDiagnostic.h" #include @@ -10,7 +10,7 @@ // OFFSET: 0x005CB520 // FUNCTION: fn_03658 -void CAdventurerAgencyMgr::CompleteChangeMaster(AsyncDiagnostic diagnostic, std::string response, WindowManagerWindows& windows) { +void CAdventurerAgencyMgr::CompleteChangeMaster(AsyncDiagnostic diagnostic, std::string response) { --this->pending; if (!diagnostic.success) { @@ -27,7 +27,7 @@ void CAdventurerAgencyMgr::CompleteChangeMaster(AsyncDiagnostic diagnostic, std: const int type = root["Type"].asInt(); if (type != 2 && type != 3) { - if (UIWindow* window = windows.LookupWindow(WID_ADVENPARTYBOARDWND)) { + if (UIWindow* window = g_windowMgr.LookupWindow(WID_ADVENPARTYBOARDWND)) { window->SendMsg(nullptr, UM_COMMAND, ID_PARTY_RELOAD_FIRST_PAGE, 0, 0, 0); } } diff --git a/Source/Contents/Party/LoadMyPartyAsyncWork.cpp b/Source/Contents/Party/LoadMyPartyAsyncWork.cpp index 40c3a3b35..309f183bc 100644 --- a/Source/Contents/Party/LoadMyPartyAsyncWork.cpp +++ b/Source/Contents/Party/LoadMyPartyAsyncWork.cpp @@ -38,7 +38,7 @@ namespace { // OFFSET: 0x005CF1B0 // FUNCTION: fn_03685 CLoadMyPartyAsyncWork::CLoadMyPartyAsyncWork() - : NAsyncWork("MyParty_Load"), m_accountId(0), m_characterId(0), m_diagnostic(Diagnostic(false, DecryptName<0x2FF3C5036D070127ULL>({0x52, 0x6F, 0x6C, 0x03, 0x74, 0xAA, 0x9D, 0x2F}), 28)), m_windows(nullptr) { + : NAsyncWork("MyParty_Load"), m_accountId(0), m_characterId(0), m_diagnostic(Diagnostic(false, DecryptName<0x2FF3C5036D070127ULL>({0x52, 0x6F, 0x6C, 0x03, 0x74, 0xAA, 0x9D, 0x2F}), 28)) { } // INLINED @@ -51,9 +51,7 @@ void CLoadMyPartyAsyncWork::Reset() { // OFFSET: 0x005CF670 // FUNCTION: fn_03687 -void CLoadMyPartyAsyncWork::Bind( - std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token, WindowManagerWindows& windows -) { +void CLoadMyPartyAsyncWork::Bind(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token) { this->m_group = timeGetTime(); this->m_accountId = accountId; this->m_characterId = characterId; @@ -63,7 +61,6 @@ void CLoadMyPartyAsyncWork::Bind( this->m_token = token; AsyncDiagnostic diagnostic = Diagnostic(false, DecryptName<0x17359BF953C367B3ULL>({0xC6, 0x09, 0xA8, 0x3D, 0x8E, 0xF4, 0x5B, 0x17}), 49); this->m_diagnostic.MoveFrom(diagnostic); - this->m_windows = &windows; } // OFFSET: 0x005CF9B0 @@ -93,7 +90,7 @@ bool CLoadMyPartyAsyncWork::Execute() { // OFFSET: 0x005CF8F0 // FUNCTION: fn_03689 void CLoadMyPartyAsyncWork::Complete() { - g_adventurerAgencyMgr->CompleteMyParty(this->m_diagnostic, this->m_response, *this->m_windows); + g_adventurerAgencyMgr->CompleteMyParty(this->m_diagnostic, this->m_response); } template void std::deque::push_back(CLoadMyPartyAsyncWork*&&); diff --git a/Source/Contents/Party/LoadMyPartyAsyncWork.h b/Source/Contents/Party/LoadMyPartyAsyncWork.h index 628beb7c1..d1a0ca37f 100644 --- a/Source/Contents/Party/LoadMyPartyAsyncWork.h +++ b/Source/Contents/Party/LoadMyPartyAsyncWork.h @@ -4,7 +4,8 @@ #include "Utility/Async/AsyncDiagnostic.h" #include "Utility/Async/NAsyncWork.h" -#include "UI/Window/WindowManagerWindows.h" +#include +#include class CLoadMyPartyAsyncWork : public NAsyncWork { public: @@ -13,7 +14,7 @@ public: void Reset() override; bool Execute() override; void Complete() override; - void Bind(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token, WindowManagerWindows& windows); + void Bind(std::uint32_t accountId, std::uint32_t characterId, std::string world, std::string url, std::string token); protected: /* 0028 */ std::uint32_t m_accountId; @@ -23,11 +24,10 @@ protected: /* 0060 */ std::string m_response; /* 0078 */ std::string m_url; /* 0090 */ AsyncDiagnostic m_diagnostic; - WindowManagerWindows* m_windows; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(sizeof(CLoadMyPartyAsyncWork) == 204); +static_assert(sizeof(CLoadMyPartyAsyncWork) == 200); #endif #endif diff --git a/Source/Contents/Party/MyPartyCompletion.cpp b/Source/Contents/Party/MyPartyCompletion.cpp index 5df0fdc42..adc7fbea9 100644 --- a/Source/Contents/Party/MyPartyCompletion.cpp +++ b/Source/Contents/Party/MyPartyCompletion.cpp @@ -1,7 +1,7 @@ #include "Contents/Party/AdventurerAgencyMgr.h" #include "UI/Window/WindowId.h" #include "UI/Party/UIAdvenPartyBoardWnd.h" -#include "UI/Window/WindowManagerWindows.h" +#include "UI/Window/UIWindowMgr.h" #include "Utility/Async/AsyncDiagnostic.h" #include @@ -9,7 +9,7 @@ // OFFSET: 0x005CB810 // FUNCTION: fn_03660 -void CAdventurerAgencyMgr::CompleteMyParty(AsyncDiagnostic diagnostic, std::string response, WindowManagerWindows& windows) { +void CAdventurerAgencyMgr::CompleteMyParty(AsyncDiagnostic diagnostic, std::string response) { --this->pending; if (!diagnostic.success) { @@ -29,7 +29,7 @@ void CAdventurerAgencyMgr::CompleteMyParty(AsyncDiagnostic diagnostic, std::stri if (root["data"].isNull()) { this->registered = false; - auto* board = static_cast(windows.EnsureWindow(WID_ADVENPARTYBOARDWND)); + auto* board = static_cast(g_windowMgr.EnsureWindow(WID_ADVENPARTYBOARDWND)); if (board) { board->Registration(false); @@ -51,7 +51,7 @@ void CAdventurerAgencyMgr::CompleteMyParty(AsyncDiagnostic diagnostic, std::stri info.maximumLevel = data.get("MaxLV", 999).asInt(); info.type = data.get("Type", 1).asInt(); info.memo = data.get("Memo", "").asString(); - auto* board = static_cast(windows.EnsureWindow(WID_ADVENPARTYBOARDWND)); + auto* board = static_cast(g_windowMgr.EnsureWindow(WID_ADVENPARTYBOARDWND)); if (board) { board->SetOwnParty(info); diff --git a/Source/Render/DeviceContext/DCSurface.cpp b/Source/Render/DeviceContext/DCSurface.cpp index b8f8400f6..baf71008d 100644 --- a/Source/Render/DeviceContext/DCSurface.cpp +++ b/Source/Render/DeviceContext/DCSurface.cpp @@ -22,7 +22,7 @@ std::shared_ptr RenderSystemHolder::BackBufferSurface() const { // OFFSET: 0x00569C90 // FUNCTION: fn_02270 -void RenderSystemHolder::Shutdown() noexcept { +RenderSystemHolder::~RenderSystemHolder() noexcept { delete this->system; this->system = nullptr; ClearDirectDrawModes(); diff --git a/Source/Render/DeviceContext/DCSurface.h b/Source/Render/DeviceContext/DCSurface.h index ba3ce83e2..2e709e920 100644 --- a/Source/Render/DeviceContext/DCSurface.h +++ b/Source/Render/DeviceContext/DCSurface.h @@ -18,7 +18,9 @@ ScreenDimensions* DefaultResolution(ScreenDimensions* output); struct RenderSystemHolder { /* 0000 */ CRenderSystemBase* system; - void Shutdown() noexcept; + RenderSystemHolder() : system(nullptr) { + } + ~RenderSystemHolder() noexcept; CRenderer* CreateRenderer(); CSurface* CreateSurface(std::uint32_t width, std::uint32_t height); CTexture* CreateTexture(std::uint32_t width, std::uint32_t height, std::int32_t format, bool dynamic, bool renderTarget);