Put some #ifdef's around code that was Linux/UNIX specific in the various

SDL FrameBuffer classes.  This is in preparation for the port of the SDL
version to Windows (which already runs quite well).

This may eventually be a replacement for Cyberstella ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@222 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2003-11-30 22:50:15 +00:00
parent 8915cf50bf
commit 8c52f29bfe
3 changed files with 8 additions and 6 deletions

View File

@ -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: FrameBufferGL.cxx,v 1.8 2003-11-30 03:36:51 stephena Exp $
// $Id: FrameBufferGL.cxx,v 1.9 2003-11-30 22:50:15 stephena Exp $
//============================================================================
#include <SDL.h>
@ -114,10 +114,12 @@ bool FrameBufferGL::init()
// Check which system we are running under
x11Available = false;
#ifdef UNIX
SDL_VERSION(&myWMInfo.version);
if(SDL_GetWMInfo(&myWMInfo) > 0)
if(myWMInfo.subsystem == SDL_SYSWM_X11)
x11Available = true;
#endif
// Get the maximum size of a window for THIS screen
theMaxZoomLevel = maxWindowSizeForScreen();

View File

@ -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: FrameBufferSDL.cxx,v 1.6 2003-11-24 14:51:06 stephena Exp $
// $Id: FrameBufferSDL.cxx,v 1.7 2003-11-30 22:50:15 stephena Exp $
//============================================================================
#include <SDL.h>
@ -153,7 +153,7 @@ void FrameBufferSDL::grabMouse(bool grab)
uInt32 FrameBufferSDL::maxWindowSizeForScreen()
{
if(!x11Available)
return 1;
return 3;
#ifdef UNIX
// Otherwise, lock the screen and get the width and height
@ -183,7 +183,5 @@ uInt32 FrameBufferSDL::maxWindowSizeForScreen()
return multiplier;
else
return 1;
#else
return 1;
#endif
}

View File

@ -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: FrameBufferSoft.cxx,v 1.2 2003-11-22 20:13:11 stephena Exp $
// $Id: FrameBufferSoft.cxx,v 1.3 2003-11-30 22:50:15 stephena Exp $
//============================================================================
#include <SDL.h>
@ -88,10 +88,12 @@ bool FrameBufferSoft::init()
// Check which system we are running under
x11Available = false;
#ifdef UNIX
SDL_VERSION(&myWMInfo.version);
if(SDL_GetWMInfo(&myWMInfo) > 0)
if(myWMInfo.subsystem == SDL_SYSWM_X11)
x11Available = true;
#endif
// Get the maximum size of a window for THIS screen
theMaxZoomLevel = maxWindowSizeForScreen();