From 500025b5b800c65546d2083d3b837d63d9a73f1b Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 20 Jan 2006 13:45:45 +0000 Subject: [PATCH] Fixed bug in getScreenDimensions returning incorrect values. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@974 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/emucore/FrameBuffer.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 201055fdd..1576dd347 100644 --- a/stella/src/emucore/FrameBuffer.cxx +++ b/stella/src/emucore/FrameBuffer.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBuffer.cxx,v 1.76 2006-01-15 16:31:01 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.77 2006-01-20 13:45:45 stephena Exp $ //============================================================================ #include @@ -91,12 +91,13 @@ void FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height, // Query the desktop size // This is really the job of SDL - myDesktopDim.w = myDesktopDim.h = 0; + int dwidth = 0, dheight = 0; #if defined(OS2) // FIXME - make proper OS/2 port myDesktopDim.w = WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN); myDesktopDim.h = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN); #else - myOSystem->getScreenDimensions((int&)myDesktopDim.w, (int&)myDesktopDim.h); + myOSystem->getScreenDimensions(dwidth, dheight); + myDesktopDim.w = dwidth; myDesktopDim.h = dheight; #endif // Set fullscreen flag