From cd31a9e3aa55e25a930fb26ce48db278c6532af8 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Fri, 21 Nov 2025 22:49:13 +0100 Subject: [PATCH] Silence wxGameList asserts by adding images instead --- src/gui/wxgui/components/wxGameList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/wxgui/components/wxGameList.cpp b/src/gui/wxgui/components/wxGameList.cpp index e682d671..ac831b5a 100644 --- a/src/gui/wxgui/components/wxGameList.cpp +++ b/src/gui/wxgui/components/wxGameList.cpp @@ -141,14 +141,14 @@ wxGameList::wxGameList(wxWindow* parent, wxWindowID id) const auto& config = GetWxGUIConfig(); char transparent_bitmap[kIconWidth * kIconWidth * 4] = {}; - memset((void*)transparent_bitmap, wxSystemSettings::GetAppearance().IsDark() ? 0xFF : 0x00, sizeof(transparent_bitmap)); + memset(transparent_bitmap, wxSystemSettings::GetAppearance().IsDark() ? 0xFF : 0x00, sizeof(transparent_bitmap)); wxBitmap blank(transparent_bitmap, kIconWidth, kIconWidth); - m_image_list_data.Replace(0, blank); + m_image_list_data.Add(blank); wxListCtrl::SetImageList(&m_image_list_data, wxIMAGE_LIST_NORMAL); wxBitmap::Rescale(blank, {kListIconWidth, kListIconWidth}); - m_image_list_small_data.Replace(0, blank); + m_image_list_small_data.Add(blank); wxListCtrl::SetImageList(&m_image_list_small_data, wxIMAGE_LIST_SMALL); InsertColumn(ColumnHiddenName, "", wxLIST_FORMAT_LEFT, 0);