diff options
author | Stefan Saraev <stefansaraev@users.noreply.github.com> | 2016-04-07 21:37:32 +0300 |
---|---|---|
committer | Stefan Saraev <stefansaraev@users.noreply.github.com> | 2016-04-07 21:37:32 +0300 |
commit | 2baa51266144e970bdb04a959542298cd449d13f (patch) | |
tree | 7b37767ff3f6864223d588cbbacb0c5895058256 | |
parent | ebe4618659d0cad87ee730bba6d1fbe778d90f6c (diff) | |
parent | 61bfc8f1eaef4f8a31a8bccfb277ff030dde7ff7 (diff) |
Merge pull request #9553 from koying/fixcaprefrate
FIX: [droid] cap refresh rates when probing, too
-rw-r--r-- | xbmc/windowing/egl/EGLNativeTypeAndroid.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xbmc/windowing/egl/EGLNativeTypeAndroid.cpp b/xbmc/windowing/egl/EGLNativeTypeAndroid.cpp index 8b7b695c03..a5208ec649 100644 --- a/xbmc/windowing/egl/EGLNativeTypeAndroid.cpp +++ b/xbmc/windowing/egl/EGLNativeTypeAndroid.cpp @@ -196,19 +196,21 @@ bool CEGLNativeTypeAndroid::ProbeResolutions(std::vector<RESOLUTION_INFO> &resol } } - if (refreshRates.size()) + if (!refreshRates.empty()) { for (unsigned int i = 0; i < refreshRates.size(); i++) { + if (refreshRates[i] < 20.0 || refreshRates[i] > 70.0) + continue; res.fRefreshRate = refreshRates[i]; res.strMode = StringUtils::Format("%dx%d @ %.2f%s - Full Screen", res.iScreenWidth, res.iScreenHeight, res.fRefreshRate, res.dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); resolutions.push_back(res); } } - else + if (resolutions.empty()) { - /* No refresh rate list available, just provide the current one */ + /* No valid refresh rates available, just provide the current one */ resolutions.push_back(res); } return true; |