MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / loadScreenSettingsFromStream

Method loadScreenSettingsFromStream

Source/Util/Config.cpp:61–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void Config::loadScreenSettingsFromStream(ConfigParser& parser)
62{
63 while (parser.atKVP())
64 {
65 auto kvp = parser.getKVP();
66 if (kvp.first == "width")
67 m_video_mode.width = std::stoi(kvp.second);
68 else if (kvp.first == "height")
69 m_video_mode.height = std::stoi(kvp.second);
70 else
71 parser.error("Unrecognised key \"" + kvp.first + "\"");
72 }
73}
74
75void Config::loadKeybindingsFromStream(ConfigParser& parser)
76{

Callers

nothing calls this directly

Calls 3

atKVPMethod · 0.80
getKVPMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected