Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8a11b3c
mbedTLS fix for cURL 8.8.0
Lpsd May 24, 2024
181bf0f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd May 24, 2024
6728cbe
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd May 25, 2024
0b989ac
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd May 26, 2024
9c19509
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jun 2, 2024
75c36ed
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jun 19, 2024
96dd1ee
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 2, 2024
f9eaf3f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 8, 2024
54bd11b
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 10, 2024
ddee2d0
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 19, 2024
288b8db
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 21, 2024
b30a4a2
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 22, 2024
27b9eae
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Dec 17, 2024
3731d81
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 14, 2025
b50a68c
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 22, 2025
58ae23f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Feb 19, 2025
20f1d27
Allow display manager to cleanup expired instances
Lpsd Feb 20, 2025
90bc1dd
Adjust expiration (only after svg destroyed)
Lpsd Feb 20, 2025
f3645b8
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Mar 4, 2025
489eb7b
Merge branch 'master' into svg-ptr-fix
Lpsd Mar 4, 2025
df9d47d
Use shared_ptr
Lpsd Mar 5, 2025
e62d9f4
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Mar 14, 2025
812ec31
Merge branch 'master' into svg-ptr-fix
Lpsd Mar 14, 2025
e95ca0e
Implement shared_ptr and weak_ptr references for CClientDisplay(Manager)
Lpsd Mar 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/CClientVectorGraphic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CClientVectorGraphic::CClientVectorGraphic(CClientManager* pManager, ElementID I

m_pManager = pManager;

m_pVectorGraphicDisplay = std::make_unique<CClientVectorGraphicDisplay>(m_pManager->GetDisplayManager(), this);
m_pVectorGraphicDisplay = new CClientVectorGraphicDisplay(m_pManager->GetDisplayManager(), this);

// Generate the default XML document
SString defaultXmlString = SString("<svg viewBox='0 0 %u %u'></svg>", pVectorGraphicItem->m_uiSizeX, pVectorGraphicItem->m_uiSizeY);
Expand Down
4 changes: 2 additions & 2 deletions Client/mods/deathmatch/logic/CClientVectorGraphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CClientVectorGraphic final : public CClientTexture
lunasvg::Document* GetSVGDocument() const { return m_pSVGDocument.get(); }
CXMLNode* GetXMLDocument() const { return m_pXMLDocument; }

CClientVectorGraphicDisplay* GetDisplay() const { return m_pVectorGraphicDisplay.get(); }
CClientVectorGraphicDisplay* GetDisplay() const { return m_pVectorGraphicDisplay; }

bool IsDisplayCleared() const { return m_pVectorGraphicDisplay->IsCleared(); }
bool IsDestroyed() const { return m_bIsDestroyed; }
Expand All @@ -57,7 +57,7 @@ class CClientVectorGraphic final : public CClientTexture
std::unique_ptr<SXMLString> m_pXMLString = nullptr;
CXMLNode* m_pXMLDocument = nullptr;

std::unique_ptr<CClientVectorGraphicDisplay> m_pVectorGraphicDisplay;
CClientVectorGraphicDisplay* m_pVectorGraphicDisplay;

std::variant<CLuaFunctionRef, bool> m_updateCallbackRef = false;

Expand Down
5 changes: 4 additions & 1 deletion Client/mods/deathmatch/logic/CClientVectorGraphicDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ CClientVectorGraphicDisplay::CClientVectorGraphicDisplay(CClientDisplayManager*

void CClientVectorGraphicDisplay::Render()
{
// When the underlying vector graphic is deleted, this display will be destroyed automatically by the manager.
// CClientVectorGraphicDisplay::Render should be called as long as the display manager is still alive.
// see CClientDisplayManager::DoPulse
if (!m_pVectorGraphic || m_pVectorGraphic->IsDestroyed())
return;
return SetTimeTillExpiration(1);

if (!m_bVisible)
{
Expand Down
Loading