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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user