From 390e0a92334f147d4fb85c3492f3e1ee149eb48d Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Fri, 3 May 2024 23:08:16 +0200 Subject: [PATCH] remember the resolution when the window is resized --- ogre_mesh_viewer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ogre_mesh_viewer.py b/ogre_mesh_viewer.py index 424cfaa..1df0548 100755 --- a/ogre_mesh_viewer.py +++ b/ogre_mesh_viewer.py @@ -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)