mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-11 02:43:58 +02:00
move undohistorylimit config pref, change default to 5
This commit is contained in:
@@ -136,7 +136,7 @@ GameModel::GameModel():
|
|||||||
colourPresets.push_back(ui::Colour(0, 0, 255));
|
colourPresets.push_back(ui::Colour(0, 0, 255));
|
||||||
colourPresets.push_back(ui::Colour(0, 0, 0));
|
colourPresets.push_back(ui::Colour(0, 0, 0));
|
||||||
|
|
||||||
undoHistoryLimit = Client::Ref().GetPrefInteger("UndoHistoryLimit", 1);
|
undoHistoryLimit = Client::Ref().GetPrefInteger("Simulation.UndoHistoryLimit", 5);
|
||||||
// cap due to memory usage (this is about 3.4GB of RAM)
|
// cap due to memory usage (this is about 3.4GB of RAM)
|
||||||
if (undoHistoryLimit > 200)
|
if (undoHistoryLimit > 200)
|
||||||
undoHistoryLimit = 200;
|
undoHistoryLimit = 200;
|
||||||
@@ -167,7 +167,7 @@ GameModel::~GameModel()
|
|||||||
Client::Ref().SetPref("Decoration.Blue", (int)colour.Blue);
|
Client::Ref().SetPref("Decoration.Blue", (int)colour.Blue);
|
||||||
Client::Ref().SetPref("Decoration.Alpha", (int)colour.Alpha);
|
Client::Ref().SetPref("Decoration.Alpha", (int)colour.Alpha);
|
||||||
|
|
||||||
Client::Ref().SetPref("UndoHistoryLimit", undoHistoryLimit);
|
Client::Ref().SetPref("Simulation.UndoHistoryLimit", undoHistoryLimit);
|
||||||
|
|
||||||
Favorite::Ref().SaveFavoritesToPrefs();
|
Favorite::Ref().SaveFavoritesToPrefs();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user