diff --git a/debug.cpp b/debug.cpp index 49e4cda8..e0979110 100644 --- a/debug.cpp +++ b/debug.cpp @@ -306,10 +306,13 @@ vector > drawbugs; bool debugmode = false; +// static apparently does not work in old compilers +int bitfield_v; + template void bitfield_editor(int val, const T& setter, string help = "") { - static int v = val; - dialog::editNumber(v, 0, 100, 1, v, help, ""); - dialog::reaction = [&setter] () { setter(v); }; + bitfield_v = val; + dialog::editNumber(bitfield_v, 0, 100, 1, bitfield_v, help, ""); + dialog::reaction = [&setter] () { setter(bitfield_v); }; } struct debugScreen {