- fix in VideoRecorderAppState cleanup

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8718 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 86956cf130
commit fce5f6556b
  1. 7
      engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java

@ -50,6 +50,7 @@ public class VideoRecorderAppState extends AbstractAppState {
} }
}); });
private int numCpus = Runtime.getRuntime().availableProcessors(); private int numCpus = Runtime.getRuntime().availableProcessors();
private ViewPort lastViewPort;
public VideoRecorderAppState() { public VideoRecorderAppState() {
Logger.getLogger(this.getClass().getName()).log(Level.INFO, "JME3 VideoRecorder running on {0} CPU's", numCpus); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "JME3 VideoRecorder running on {0} CPU's", numCpus);
@ -82,13 +83,13 @@ public class VideoRecorderAppState extends AbstractAppState {
} }
processor = new VideoProcessor(); processor = new VideoProcessor();
List<ViewPort> vps = app.getRenderManager().getPostViews(); List<ViewPort> vps = app.getRenderManager().getPostViews();
ViewPort last = vps.get(vps.size()-1); lastViewPort = vps.get(vps.size()-1);
last.addProcessor(processor); lastViewPort.addProcessor(processor);
} }
@Override @Override
public void cleanup() { public void cleanup() {
app.getViewPort().removeProcessor(processor); lastViewPort.removeProcessor(processor);
app.setTimer(new NanoTimer()); app.setTimer(new NanoTimer());
initialized = false; initialized = false;
file = null; file = null;

Loading…
Cancel
Save