mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 16:52:42 +00:00
Fix the window icon that cannot be loaded in release packages, refs 27d99765bb.
Discussed with Imarok and elexis. This was SVN commit r21812.
This commit is contained in:
@@ -500,9 +500,12 @@ SDL_Window* CVideoMode::GetWindow()
|
|||||||
|
|
||||||
void CVideoMode::SetWindowIcon()
|
void CVideoMode::SetWindowIcon()
|
||||||
{
|
{
|
||||||
|
// The window icon should be kept outside of art/textures/, or else it will be converted
|
||||||
|
// to DDS by the archive builder and will become unusable here. Using DDS makes BGRA
|
||||||
|
// conversion needlessly complicated.
|
||||||
std::shared_ptr<u8> iconFile;
|
std::shared_ptr<u8> iconFile;
|
||||||
size_t iconFileSize;
|
size_t iconFileSize;
|
||||||
if (g_VFS->LoadFile("art/textures/icons/window.png", iconFile, iconFileSize) != INFO::OK)
|
if (g_VFS->LoadFile("art/icons/window.png", iconFile, iconFileSize) != INFO::OK)
|
||||||
{
|
{
|
||||||
LOGWARNING("Window icon not found.");
|
LOGWARNING("Window icon not found.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user