summaryrefslogtreecommitdiffstats
path: root/hacks/petri.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-30 16:07:15 +0200
committerSimon Rettberg2019-07-30 16:07:15 +0200
commit813ac136e48f60d4c2b13e808107870dafcc4d52 (patch)
tree396a6c98276f6e9a04216933daebdf3af7b81d46 /hacks/petri.c
parentFlush X events before locking if we have an external ungrab command (diff)
parentUpdate to 5.43 (diff)
downloadxscreensaver-813ac136e48f60d4c2b13e808107870dafcc4d52.tar.gz
xscreensaver-813ac136e48f60d4c2b13e808107870dafcc4d52.tar.xz
xscreensaver-813ac136e48f60d4c2b13e808107870dafcc4d52.zip
Merge branch 'master' into openslx (5.43)
Diffstat (limited to 'hacks/petri.c')
-rw-r--r--hacks/petri.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hacks/petri.c b/hacks/petri.c
index e97c582..1906369 100644
--- a/hacks/petri.c
+++ b/hacks/petri.c
@@ -245,7 +245,10 @@ setup_display (struct state *st)
XWindowAttributes xgwa;
int cell_size = get_integer_resource (st->dpy, "size", "Integer");
- int osize, alloc_size, oalloc;
+ int osize, alloc_size;
+#if 0
+ int oalloc;
+#endif
int mem_throttle = 0;
char *s;
@@ -404,7 +407,9 @@ setup_display (struct state *st)
st->arr_height = st->windowHeight / cell_size;
alloc_size = sizeof(cell) * st->arr_width * st->arr_height;
+# if 0
oalloc = alloc_size;
+# endif
if (mem_throttle > 0)
while (cell_size < st->windowWidth/10 &&
@@ -419,7 +424,8 @@ setup_display (struct state *st)
if (osize != cell_size)
{
- if (0 && !st->warned)
+# if 0
+ if (!st->warned)
{
fprintf (stderr,
"%s: throttling cell size from %d to %d because of %dM limit.\n",
@@ -432,6 +438,7 @@ setup_display (struct state *st)
((float) alloc_size) / (1 << 20));
st->warned = 1;
}
+# endif
}
st->xSize = st->arr_width ? st->windowWidth / st->arr_width : 0;