Fix a user-reported crash

This commit is contained in:
Cameron Gutman
2019-06-22 22:01:30 -07:00
parent deb78e1c64
commit 1308a4ed80
+3 -1
View File
@@ -286,12 +286,14 @@ public class Game extends Activity implements SurfaceHolder.Callback,
// We must now ensure our display is compatible with HDR10 // We must now ensure our display is compatible with HDR10
boolean foundHdr10 = false; boolean foundHdr10 = false;
if (hdrCaps != null) {
// getHdrCapabilities() returns null on Lenovo Lenovo Mirage Solo (vega), Android 8.0
for (int hdrType : hdrCaps.getSupportedHdrTypes()) { for (int hdrType : hdrCaps.getSupportedHdrTypes()) {
if (hdrType == Display.HdrCapabilities.HDR_TYPE_HDR10) { if (hdrType == Display.HdrCapabilities.HDR_TYPE_HDR10) {
LimeLog.info("Display supports HDR10");
foundHdr10 = true; foundHdr10 = true;
} }
} }
}
if (!foundHdr10) { if (!foundHdr10) {
// Nope, no HDR for us :( // Nope, no HDR for us :(