MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / setFormat

Method setFormat

src/bzflag/FormatMenu.cpp:211–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void FormatMenu::setFormat(bool test) {
212 int selectedIndex = (page * NumItems) + (int)getNav().getIndex();
213 if (selectedIndex >= numFormats || badFormats[selectedIndex]) {
214 return;
215 }
216
217 if (!setVideoFormat(selectedIndex, test)) {
218 // can't load format
219 badFormats[selectedIndex] = true;
220 }
221 else if (!test) {
222 // print OpenGL renderer, which might have changed
223 printError((const char*)glGetString(GL_RENDERER));
224 }
225
226 currentLabel->setString(display->getResolution(display->getResolution())->name);
227}
228
229void FormatMenu::resize(int _width, int _height) {
230 HUDDialog::resize(_width, _height);

Callers

nothing calls this directly

Calls 5

getResolutionMethod · 0.80
setVideoFormatFunction · 0.70
printErrorFunction · 0.50
getIndexMethod · 0.45
setStringMethod · 0.45

Tested by

no test coverage detected