mirror of https://github.com/stella-emu/stella.git
Fixed bug where using -center and -fullscreen at the same time didn't work
correctly. The emulator would start fullscreen, but if switched to windowed mode, it wouldn't be centered. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@37 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
72d209a88d
commit
cd9f9a18cb
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: mainSDL.cxx,v 1.4 2002-01-16 15:09:21 stephena Exp $
|
// $Id: mainSDL.cxx,v 1.5 2002-01-19 02:17:19 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -314,15 +314,25 @@ bool setupDisplay()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Center the window if centering is selected and not fullscreen
|
// Make sure that theUseFullScreenFlag sets up fullscreen mode correctly
|
||||||
if(theCenterWindowFlag && !theUseFullScreenFlag)
|
if(theUseFullScreenFlag)
|
||||||
centerWindow();
|
{
|
||||||
|
grabMouse(true);
|
||||||
|
showCursor(false);
|
||||||
|
isFullscreen = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Keep mouse in game window if grabmouse is selected
|
// Keep mouse in game window if grabmouse is selected
|
||||||
grabMouse(theGrabMouseFlag);
|
grabMouse(theGrabMouseFlag);
|
||||||
|
|
||||||
// Show or hide the cursor depending on the 'hidecursor' argument
|
// Show or hide the cursor depending on the 'hidecursor' argument
|
||||||
showCursor(!theHideCursorFlag);
|
showCursor(!theHideCursorFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Center the window if centering is selected and not fullscreen
|
||||||
|
if(theCenterWindowFlag && !theUseFullScreenFlag)
|
||||||
|
centerWindow();
|
||||||
|
|
||||||
#ifdef IMLIB2_SNAPSHOT
|
#ifdef IMLIB2_SNAPSHOT
|
||||||
SDL_SysWMinfo info;
|
SDL_SysWMinfo info;
|
||||||
|
|
Loading…
Reference in New Issue