Allow the reading of the display configuration to be overridden.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3571 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -91,18 +91,7 @@ public class JmeApp
|
||||
{
|
||||
// load up our renderer configuration
|
||||
_properties = new PropertiesIO(getConfigPath("jme.cfg"));
|
||||
if (!_properties.load()) {
|
||||
LWJGLPropertiesDialog dialog =
|
||||
new LWJGLPropertiesDialog(_properties, (String)null);
|
||||
while (dialog.isVisible()) {
|
||||
try {
|
||||
Thread.sleep(5);
|
||||
} catch (InterruptedException e) {
|
||||
Log.warning("Error waiting for dialog system, " +
|
||||
"using defaults.");
|
||||
}
|
||||
}
|
||||
}
|
||||
readDisplayConfig();
|
||||
|
||||
// create an appropriate timer
|
||||
_timer = Timer.getTimer(_properties.getRenderer());
|
||||
@@ -197,6 +186,27 @@ public class JmeApp
|
||||
return Thread.currentThread() == _dispatchThread;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads in the contents of our display properties. Derivations may
|
||||
* wish to override this and configure the display properties from
|
||||
* some other source.
|
||||
*/
|
||||
protected void readDisplayConfig ()
|
||||
{
|
||||
if (!_properties.load()) {
|
||||
LWJGLPropertiesDialog dialog =
|
||||
new LWJGLPropertiesDialog(_properties, (String)null);
|
||||
while (dialog.isVisible()) {
|
||||
try {
|
||||
Thread.sleep(5);
|
||||
} catch (InterruptedException e) {
|
||||
Log.warning("Error waiting for dialog system, " +
|
||||
"using defaults.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the underlying rendering system, creating a display of
|
||||
* the proper resolution and depth.
|
||||
|
||||
Reference in New Issue
Block a user