Преглед изворни кода

iOS can use any resolution

Andrey Filipenkov пре 3 година
родитељ
комит
76b36b8951
2 измењених фајлова са 6 додато и 0 уклоњено
  1. 4 0
      client/windows/GUIClasses.cpp
  2. 2 0
      launcher/settingsView/csettingsview_moc.cpp

+ 4 - 0
client/windows/GUIClasses.cpp

@@ -562,14 +562,18 @@ void CSystemOptionsWindow::selectGameRes()
 	std::vector<std::string> items;
 	const JsonNode & texts = CGI->generaltexth->localizedTexts["systemOptions"]["resolutionMenu"];
 
+#ifndef VCMI_IOS
 	SDL_Rect displayBounds;
 	SDL_GetDisplayBounds(std::max(0, SDL_GetWindowDisplayIndex(mainWindow)), &displayBounds);
+#endif
 
 	for(const auto & it : conf.guiOptions)
 	{
 		const auto & resolution = it.first;
+#ifndef VCMI_IOS
 		if(displayBounds.w < resolution.first || displayBounds.h < resolution.second)
 			continue;
+#endif
 
 		std::string resX = boost::lexical_cast<std::string>(resolution.first);
 		std::string resY = boost::lexical_cast<std::string>(resolution.second);

+ 2 - 0
launcher/settingsView/csettingsview_moc.cpp

@@ -137,8 +137,10 @@ void CSettingsView::fillValidResolutionsForScreen(int screenIndex)
 			continue;
 
 		const QSize resolution{widthValue.toInt(), heightValue.toInt()};
+#ifndef VCMI_IOS
 		if(screenSize.width() < resolution.width() || screenSize.height() < resolution.height())
 			continue;
+#endif
 		ui->comboBoxResolution->addItem(resolutionToString(resolution));
 	}