Avoids initializing the display twice (work in progress)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9894 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
965b595384
commit
03fe815bd2
@ -259,6 +259,8 @@ public class JoglDisplay extends JoglAbstractDisplay {
|
|||||||
public void init(GLAutoDrawable drawable){
|
public void init(GLAutoDrawable drawable){
|
||||||
// prevent initializing twice on restart
|
// prevent initializing twice on restart
|
||||||
if (!wasInited){
|
if (!wasInited){
|
||||||
|
wasInited = true;
|
||||||
|
|
||||||
canvas.requestFocus();
|
canvas.requestFocus();
|
||||||
|
|
||||||
super.internalCreate();
|
super.internalCreate();
|
||||||
@ -266,8 +268,6 @@ public class JoglDisplay extends JoglAbstractDisplay {
|
|||||||
|
|
||||||
renderer.initialize();
|
renderer.initialize();
|
||||||
listener.initialize();
|
listener.initialize();
|
||||||
|
|
||||||
wasInited = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user