Skip to content

Commit

Permalink
remember the resolution when the window is resized
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed May 3, 2024
1 parent 553c9c7 commit 390e0a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ogre_mesh_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,10 @@ def setup(self):
self.input_dispatcher = OgreBites.InputListenerChain([self.getImGuiInputListener(), self.camman, self])
self.addInputListener(self.input_dispatcher)

def windowResized(self, win):
# remember the resolution for next start
self.getRoot().getRenderSystem().setConfigOption("Video Mode", f"{win.getWidth()} x {win.getHeight()}")

def shutdown(self):
self.scn_mgr.removeListener(self.axes)
Ogre.LogManager.getSingleton().getDefaultLog().removeListener(self.logwin)
Expand Down

0 comments on commit 390e0a9

Please sign in to comment.