SDL: Replace gfx_mode with scale_factor in initSizeHint()
This commit is contained in:
parent
42bc12a007
commit
a14c5a4a53
6 changed files with 1 additions and 41 deletions
|
@ -138,26 +138,11 @@ bool SdlGraphicsManager::defaultGraphicsModeConfig() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
int SdlGraphicsManager::getGraphicsModeIdByName(const Common::String &name) const {
|
||||
if (name == "normal" || name == "default") {
|
||||
return getDefaultGraphicsMode();
|
||||
}
|
||||
|
||||
const OSystem::GraphicsMode *mode = getSupportedGraphicsModes();
|
||||
while (mode && mode->name != nullptr) {
|
||||
if (name.equalsIgnoreCase(mode->name)) {
|
||||
return mode->id;
|
||||
}
|
||||
++mode;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void SdlGraphicsManager::initSizeHint(const Graphics::ModeList &modes) {
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
const bool useDefault = defaultGraphicsModeConfig();
|
||||
|
||||
int scale = getGraphicsModeScale(getGraphicsModeIdByName(ConfMan.get("gfx_mode")));
|
||||
int scale = ConfMan.getInt("scale_factor");
|
||||
if (scale == -1) {
|
||||
warning("Unknown scaler; defaulting to 1");
|
||||
scale = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue