158 lines
4.6 KiB
Diff
158 lines
4.6 KiB
Diff
Source: @pullmoll
|
|
Upstream: no
|
|
Reason: variable name 'mips' clashes with target system headers
|
|
|
|
--- src/bin/e_wallpaper_gen_main.c 2020-05-31 20:22:37.495587000 +0200
|
|
+++ src/bin/e_wallpaper_gen_main.c 2020-11-09 17:21:27.533538646 +0100
|
|
@@ -85,33 +85,33 @@
|
|
{
|
|
int i, j = 0;
|
|
int nw, nh, pw = 0, ph = 0;
|
|
- Mip *mips = calloc(1, sizeof(Mip) * MAX_RES_NUM);
|
|
+ Mip *l_mips = calloc(1, sizeof(Mip) * MAX_RES_NUM);
|
|
|
|
- if (!mips) return NULL;
|
|
+ if (!l_mips) return NULL;
|
|
for (i = 0; resolutions[i]; i += 2)
|
|
{
|
|
nh = resolutions[i + 1];
|
|
nw = (w * nh) / h;
|
|
if ((nh >= h) || (nw >= w))
|
|
{
|
|
- mips[j].from_w = pw;
|
|
- mips[j].from_h = ph;
|
|
- mips[j].to_w = 1000000000;
|
|
- mips[j].to_h = 1000000000;
|
|
- mips[j].last = EINA_TRUE;
|
|
+ l_mips[j].from_w = pw;
|
|
+ l_mips[j].from_h = ph;
|
|
+ l_mips[j].to_w = 1000000000;
|
|
+ l_mips[j].to_h = 1000000000;
|
|
+ l_mips[j].last = EINA_TRUE;
|
|
break;
|
|
}
|
|
|
|
- mips[j].from_w = pw;
|
|
- mips[j].from_h = ph;
|
|
- mips[j].to_w = nw;
|
|
- mips[j].to_h = nh;
|
|
+ l_mips[j].from_w = pw;
|
|
+ l_mips[j].from_h = ph;
|
|
+ l_mips[j].to_w = nw;
|
|
+ l_mips[j].to_h = nh;
|
|
|
|
j++;
|
|
pw = nw + 1;
|
|
ph = nh + 1;
|
|
}
|
|
- return mips;
|
|
+ return l_mips;
|
|
}
|
|
|
|
EAPI int
|
|
@@ -123,9 +123,9 @@
|
|
int bg_b = 64;
|
|
char dir_buf[128], img_buf[256], edc_buf[256], cmd_buf[1024], qual_buf[64];
|
|
const char *dir, *quality_string = NULL, *img_name = NULL;
|
|
- Mip *mips = NULL;
|
|
+ Mip *l_mips = NULL;
|
|
int i, imw, imh, w, h, quality;
|
|
- int ret = 0, mips_num = 0;
|
|
+ int ret = 0, l_mips_num = 0;
|
|
Eina_Bool alpha;
|
|
FILE *f;
|
|
|
|
@@ -207,25 +207,25 @@
|
|
(!strcmp(mode, "scale_out")) ||
|
|
(!strcmp(mode, "pan")))
|
|
{ // need to produce multiple scaled versions
|
|
- mips = _resolutions_calc(w, h);
|
|
- if (!mips) return 6;
|
|
- for (i = 0; mips[i].to_w; i++)
|
|
+ l_mips = _resolutions_calc(w, h);
|
|
+ if (!l_mips) return 6;
|
|
+ for (i = 0; l_mips[i].to_w; i++)
|
|
{
|
|
- mips_num++;
|
|
- if (mips[i].last)
|
|
+ l_mips_num++;
|
|
+ if (l_mips[i].last)
|
|
{
|
|
imw = w;
|
|
imh = h;
|
|
}
|
|
else
|
|
{
|
|
- imw = mips[i].to_w;
|
|
- imh = mips[i].to_h;
|
|
+ imw = l_mips[i].to_w;
|
|
+ imh = l_mips[i].to_h;
|
|
}
|
|
evas_object_resize(subwin, imw, imh);
|
|
evas_object_resize(image, imw, imh);
|
|
elm_win_render(subwin);
|
|
- if (mips[i].last)
|
|
+ if (l_mips[i].last)
|
|
snprintf(img_buf, sizeof(img_buf), "%s/img.png",
|
|
dir);
|
|
else
|
|
@@ -239,7 +239,7 @@
|
|
}
|
|
}
|
|
// no multiple resolutions -0 save out original
|
|
- if (!mips)
|
|
+ if (!l_mips)
|
|
{
|
|
evas_object_resize(subwin, w, h);
|
|
evas_object_resize(image, w, h);
|
|
@@ -267,16 +267,16 @@
|
|
snprintf(edc_buf, sizeof(edc_buf), "%s/bg.edc", dir);
|
|
f = fopen(edc_buf, "w");
|
|
if (!f) goto cleanup;
|
|
- if ((mips) && (mips_num > 1))
|
|
+ if ((l_mips) && (l_mips_num > 1))
|
|
{
|
|
fprintf(f,
|
|
"images {\n"
|
|
" set { name: \"img\";\n");
|
|
- for (i = mips_num - 1; i >= 0; i--)
|
|
+ for (i = l_mips_num - 1; i >= 0; i--)
|
|
{
|
|
fprintf(f,
|
|
" image {\n");
|
|
- if (mips[i].last)
|
|
+ if (l_mips[i].last)
|
|
{
|
|
fprintf(f,
|
|
" image: \"img.png\" %s;\n",
|
|
@@ -284,8 +284,8 @@
|
|
}
|
|
else
|
|
{
|
|
- imw = mips[i].to_w;
|
|
- imh = mips[i].to_h;
|
|
+ imw = l_mips[i].to_w;
|
|
+ imh = l_mips[i].to_h;
|
|
fprintf(f,
|
|
" image: \"img-%ix%i.png\" %s;\n",
|
|
imw, imh, quality_string);
|
|
@@ -293,8 +293,8 @@
|
|
fprintf(f,
|
|
" size: %i %i %i %i;\n"
|
|
" }\n",
|
|
- mips[i].from_w, mips[i].from_h,
|
|
- mips[i].to_w, mips[i].to_h);
|
|
+ l_mips[i].from_w, l_mips[i].from_h,
|
|
+ l_mips[i].to_w, l_mips[i].to_h);
|
|
}
|
|
fprintf(f,
|
|
" }\n"
|
|
@@ -489,7 +489,7 @@
|
|
}
|
|
ret = system(cmd_buf);
|
|
cleanup:
|
|
- free(mips);
|
|
+ free(l_mips);
|
|
ecore_file_recursive_rm(dir);
|
|
evas_object_del(win);
|
|
return ret;
|