84 Form->ui.pageOptions->CBResolution->setCurrentIndex(0); |
84 Form->ui.pageOptions->CBResolution->setCurrentIndex(0); |
85 } |
85 } |
86 else Form->ui.pageOptions->CBResolution->setCurrentIndex(t); |
86 else Form->ui.pageOptions->CBResolution->setCurrentIndex(t); |
87 |
87 |
88 // Default the windowed resolution to 5/6 of the screen size |
88 // Default the windowed resolution to 5/6 of the screen size |
89 int screenWidth = SDL_GetVideoInfo()->current_w * 5 / 6; |
89 QSize screenSize = SDLInteraction::instance().getCurrentResolution(); |
90 int screenHeight = SDL_GetVideoInfo()->current_h * 5 / 6; |
90 screenSize *= 5.0 / 6; |
91 QString widthStr; widthStr.setNum(screenWidth); |
91 |
92 QString heightStr; heightStr.setNum(screenHeight); |
92 QString widthStr = QString::number(screenSize.width()); |
|
93 QString heightStr = QString::number(screenSize.height()); |
93 QString wWidth = value("video/windowedWidth", widthStr).toString(); |
94 QString wWidth = value("video/windowedWidth", widthStr).toString(); |
94 QString wHeight = value("video/windowedHeight", heightStr).toString(); |
95 QString wHeight = value("video/windowedHeight", heightStr).toString(); |
95 // If left blank reset the resolution to the default |
96 // If left blank reset the resolution to the default |
96 wWidth = (wWidth == "" ? widthStr : wWidth); |
97 wWidth = (wWidth == "" ? widthStr : wWidth); |
97 wHeight = (wHeight == "" ? heightStr : wHeight); |
98 wHeight = (wHeight == "" ? heightStr : wHeight); |