Merge branch 'master' of git://github.com/wesnoth/wesnoth
This commit is contained in:
commit
b480971d5d
3 changed files with 8 additions and 3 deletions
|
@ -392,7 +392,7 @@ if env["prereqs"]:
|
|||
test_env = client_env.Clone()
|
||||
conf = test_env.Configure(**configure_args)
|
||||
|
||||
have_test_prereqs = have_client_prereqs and have_server_prereqs and conf.CheckBoost('unit_test_framework') \
|
||||
have_test_prereqs = have_client_prereqs and conf.CheckBoost('unit_test_framework') \
|
||||
or Warning("WARN: Unit tests are disabled because their prerequisites are not met")
|
||||
test_env = conf.Finish()
|
||||
if not have_test_prereqs and "test" in env["default_targets"]:
|
||||
|
|
|
@ -684,7 +684,7 @@ test_sources = Split("""
|
|||
""")
|
||||
test_sources.extend(test_env.Object("tests/test_config_cache.cpp"))
|
||||
|
||||
test = test_env.WesnothProgram("test", test_sources + [libtest_utils, libwesnoth_extras, libwesnoth_core, libwesnoth_sdl, libwesnoth], have_test_prereqs)
|
||||
test = test_env.WesnothProgram("test", test_sources + [libtest_utils, libwesnoth_extras, libwesnoth_core, libwesnoth, libwesnoth_sdl, libwesnoth_extras], have_test_prereqs)
|
||||
|
||||
create_images_sources = Split("""
|
||||
tests/create_images.cpp
|
||||
|
|
|
@ -570,12 +570,17 @@ std::vector<std::pair<int, int> > CVideo::get_available_resolutions()
|
|||
return result;
|
||||
}
|
||||
|
||||
const std::pair<int,int> min_res = std::make_pair(preferences::min_allowed_width(),preferences::min_allowed_height());
|
||||
|
||||
SDL_DisplayMode mode;
|
||||
for(int i = 0; i < modes; ++i) {
|
||||
if(SDL_GetDisplayMode(0, i, &mode) == 0) {
|
||||
result.push_back(std::make_pair(mode.w, mode.h));
|
||||
if (mode.w >= min_res.first && mode.h >= min_res.second)
|
||||
result.push_back(std::make_pair(mode.w, mode.h));
|
||||
}
|
||||
}
|
||||
if(std::find(result.begin(), result.end(), min_res) == result.end())
|
||||
result.push_back(min_res);
|
||||
|
||||
std::sort(result.begin(), result.end());
|
||||
result.erase(std::unique(result.begin(), result.end()), result.end());
|
||||
|
|
Loading…
Add table
Reference in a new issue