1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 02:07:57 +00:00

memory settings saved; adjusted for the lack of get_new_handler on steam

This commit is contained in:
Zeno Rogue
2019-06-13 19:19:15 +02:00
parent b93fe4e792
commit 609fc29119
3 changed files with 8 additions and 0 deletions

View File

@@ -207,7 +207,12 @@ void apply_memory_reserve() {
}
}
catch(std::bad_alloc&) {}
#if ((ISLINUX && ISSTEAM) || ISWINDOWS)
// no get_new_handler on this compiler...
default_handler = [] { throw std::bad_alloc(); };
#else
default_handler = std::get_new_handler();
#endif
if(reserve_count > 0) std::set_new_handler(reserve_handler);
}