From 28f828262cb6f55839f7276be5b7262d5ef7b773 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Fri, 1 Apr 2016 21:14:17 -0700 Subject: [PATCH] Fix case where displayInfo.currentMode is not active yet --- lime/system/System.hx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lime/system/System.hx b/lime/system/System.hx index ddd6b9e2d..2b4e4d9d5 100644 --- a/lime/system/System.hx +++ b/lime/system/System.hx @@ -170,7 +170,15 @@ class System { } - display.currentMode = display.supportedModes[displayInfo.currentMode]; + if (Reflect.hasField (displayInfo, "currentMode")) { + + display.currentMode = display.supportedModes[displayInfo.currentMode]; + + } else { + + display.currentMode = new DisplayMode (0, 0, 60, ARGB32); + + } return display;