From c590c4b436c094b65b526f43f5462b79d3bd0f9a Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 31 Oct 2020 20:30:24 -0700 Subject: [PATCH] Reload window icon when mounting and unmounting assets The window icon is simply another asset that can be customized by level makers. And in fact, one of my levels changes the window icon. It's simply named VVVVVV.png, but it doesn't sit in the graphics folder, rather it sits in the root VVVVVV directory. I noticed that this asset was missed when per-level assets loading was added, so I decided to add it in. There's a NULL check on screenbuffer because reloadresources() gets called before screenbuffer's init() does. --- desktop_version/src/Graphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 20ebc2f3..e2d32574 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -3242,6 +3242,11 @@ void Graphics::reloadresources() { images.push_back(grphx.im_image11); images.push_back(grphx.im_image12); + if (screenbuffer != NULL) + { + screenbuffer->LoadIcon(); + } + music.init(); }