1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Cache the selected graphic resolution instead of looking it up many times.

This commit is contained in:
Frank Zago
2011-08-24 04:13:45 +00:00
parent 839c437fbc
commit 4cad2f4587
3 changed files with 10 additions and 8 deletions

View File

@ -137,7 +137,7 @@ static void setGem(AdventureMapConfig &ac, const int gem, const JsonNode &g)
ac.gemG.push_back(g["graphic"].String());
}
CConfigHandler::CConfigHandler(void)
CConfigHandler::CConfigHandler(void): current(NULL)
{
}
@ -250,9 +250,6 @@ void config::CConfigHandler::init()
cc.screenx = cc.resx;
cc.screeny = cc.resy;
}
}
GUIOptions * config::CConfigHandler::go()
{
return &guiOptions[std::pair<int,int>(cc.resx,cc.resy)];
SetResolution(cc.resx, cc.resy);
}