1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-06-08 22:02:10 +00:00

fixup to dim_listener

This commit is contained in:
Zeno Rogue
2026-04-16 23:46:51 +02:00
parent c9d6e6ee11
commit cbd91a260b
+4 -2
View File
@@ -992,12 +992,14 @@ extern struct dim_listener *dl_list;
struct dim_listener {
dim_listener *next, **prev;
dim_listener() {
dl_list->prev = &next;
if(dl_list) dl_list->prev = &next;
next = dl_list;
dl_list = this;
prev = &dl_list;
}
~dim_listener() {
*prev = next; next->prev = prev;
if(next) next->prev = prev;
*prev = next;
}
virtual void on_dim_change() {}
};