From a0747e68c05079fd36f9c2370704a4f6d5b47098 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 13 Jun 2010 21:46:50 +0200 Subject: [PATCH] Fixed: #983 Create setWindowSize private method in OpenGL driver --- code/nel/src/3d/driver/opengl/driver_opengl.h | 8 +++----- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index 135d953ae..f53843ca2 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -287,7 +287,6 @@ public: virtual void disableHardwareVertexArrayAGP(); virtual void disableHardwareTextureShader(); - virtual void setWindowSize(uint32 width, uint32 height); virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay); virtual bool setMode(const GfxMode& mode); virtual bool getModes(std::vector &modes); @@ -306,11 +305,7 @@ public: virtual nlWindow getDisplay() { -#if defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) - return NULL; -#else return _win; -#endif } virtual uint32 getAvailableVertexAGPMemory (); @@ -848,6 +843,9 @@ private: bool createWindow(const GfxMode& mode); bool destroyWindow(); + + void setWindowSize(uint32 width, uint32 height); + // Methods to manage screen resolutions bool restoreScreenMode(); bool saveScreenMode(); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index b0d9c0871..53429516d 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1559,10 +1559,10 @@ void CDriverGL::setWindowSize(uint32 width, uint32 height) if (!_FullScreen) { size_hints.flags = PSize | PMinSize | PMaxSize; - size_hints.min_width = mode.Width; - size_hints.min_height = mode.Height; - size_hints.max_width = mode.Width; - size_hints.max_height = mode.Height; + size_hints.min_width = width; + size_hints.min_height = height; + size_hints.max_width = width; + size_hints.max_height = height; } #endif