mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5026 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ba1e9445ee
commit
dca2ea4207
1 changed files with 14 additions and 3 deletions
|
@ -3992,8 +3992,8 @@ static void Image_ResampleTexture (unsigned *in, int inwidth, int inheight, unsi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define AVAIL_PNGLIB
|
//#define AVAIL_PNGLIB
|
||||||
#define AVAIL_ZLIB
|
//#define AVAIL_ZLIB
|
||||||
#ifndef MSVCLIBSPATH
|
#ifndef MSVCLIBSPATH
|
||||||
#ifdef MSVCLIBPATH
|
#ifdef MSVCLIBPATH
|
||||||
#define MSVCLIBSPATH STRINGIFY(MSVCLIBPATH)
|
#define MSVCLIBSPATH STRINGIFY(MSVCLIBPATH)
|
||||||
|
@ -4470,6 +4470,7 @@ static void GUI_CreateInstaller_Windows(void)
|
||||||
{
|
{
|
||||||
QC_snprintfz(tmp, sizeof(tmp), "%s.ico", modname);
|
QC_snprintfz(tmp, sizeof(tmp), "%s.ico", modname);
|
||||||
pngdata = QCC_ReadFile (tmp, NULL, 0, &pnglen);
|
pngdata = QCC_ReadFile (tmp, NULL, 0, &pnglen);
|
||||||
|
#ifdef AVAIL_PNGLIB
|
||||||
if (!pngdata)
|
if (!pngdata)
|
||||||
{
|
{
|
||||||
QC_snprintfz(tmp, sizeof(tmp), "%s.png", modname);
|
QC_snprintfz(tmp, sizeof(tmp), "%s.png", modname);
|
||||||
|
@ -4477,9 +4478,14 @@ static void GUI_CreateInstaller_Windows(void)
|
||||||
}
|
}
|
||||||
if (!pngdata)
|
if (!pngdata)
|
||||||
pngdata = QCC_ReadFile ("default.png", NULL, 0, &pnglen);
|
pngdata = QCC_ReadFile ("default.png", NULL, 0, &pnglen);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!pngdata)
|
if (!pngdata)
|
||||||
if (PromptForFile("Please Select Icon", "Icons\0*.ico;*.png\0All files\0*.*\0", ".", tmp, tmp, sizeof(tmp), false))
|
if (PromptForFile("Please Select Icon", "Icons\0*.ico"
|
||||||
|
#ifdef AVAIL_PNGLIB
|
||||||
|
";*.png"
|
||||||
|
#endif
|
||||||
|
"\0All files\0*.*\0", ".", tmp, tmp, sizeof(tmp), false))
|
||||||
pngdata = QCC_ReadFile (tmp, NULL, 0, &pnglen);
|
pngdata = QCC_ReadFile (tmp, NULL, 0, &pnglen);
|
||||||
|
|
||||||
if (pngdata && pngdata[0] == 0 && pngdata[1] == 0 && pngdata[2] == 1 && pngdata[3] == 0)
|
if (pngdata && pngdata[0] == 0 && pngdata[1] == 0 && pngdata[2] == 1 && pngdata[3] == 0)
|
||||||
|
@ -4524,6 +4530,7 @@ static void GUI_CreateInstaller_Windows(void)
|
||||||
if (!error && !UpdateResource(bin, RT_GROUP_ICON, MAKEINTRESOURCE(1), RESLANG, &icondata, (qbyte*)&icondata.idEntries[icondata.idCount] - (qbyte*)&icondata))
|
if (!error && !UpdateResource(bin, RT_GROUP_ICON, MAKEINTRESOURCE(1), RESLANG, &icondata, (qbyte*)&icondata.idEntries[icondata.idCount] - (qbyte*)&icondata))
|
||||||
error = "UpdateResource failed (icon group)";
|
error = "UpdateResource failed (icon group)";
|
||||||
}
|
}
|
||||||
|
#ifdef AVAIL_PNGLIB
|
||||||
else if (pngdata)
|
else if (pngdata)
|
||||||
{
|
{
|
||||||
icon_group_t icondata;
|
icon_group_t icondata;
|
||||||
|
@ -4638,6 +4645,10 @@ static void GUI_CreateInstaller_Windows(void)
|
||||||
if (!error && !UpdateResource(bin, RT_GROUP_ICON, MAKEINTRESOURCE(1), RESLANG, &icondata, (qbyte*)&icondata.idEntries[icondata.idCount] - (qbyte*)&icondata))
|
if (!error && !UpdateResource(bin, RT_GROUP_ICON, MAKEINTRESOURCE(1), RESLANG, &icondata, (qbyte*)&icondata.idEntries[icondata.idCount] - (qbyte*)&icondata))
|
||||||
error = "UpdateResource failed (icon group)";
|
error = "UpdateResource failed (icon group)";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
else
|
||||||
|
error = "icon format not supported";
|
||||||
|
|
||||||
|
|
||||||
if (mandata)
|
if (mandata)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue