mirror of https://github.com/stella-emu/stella.git
A few fixes for the recent framebuffer shuffle; this is what I get for
messing with it. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1051 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
a6ad33c40b
commit
b958c82bc1
|
@ -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: FrameBufferGL.cxx,v 1.56 2006-03-16 16:10:47 stephena Exp $
|
// $Id: FrameBufferGL.cxx,v 1.57 2006-03-17 23:06:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
|
@ -305,7 +305,8 @@ bool FrameBufferGL::createScreen()
|
||||||
SDL_GL_SwapBuffers();
|
SDL_GL_SwapBuffers();
|
||||||
p_glClear(GL_COLOR_BUFFER_BIT);
|
p_glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
cls();
|
// FIXME - figure out why this is causing a segfault
|
||||||
|
//myOSystem->eventHandler().refreshDisplay();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: FrameBufferSoft.cxx,v 1.48 2006-03-16 16:10:47 stephena Exp $
|
// $Id: FrameBufferSoft.cxx,v 1.49 2006-03-17 23:06:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -108,7 +108,7 @@ bool FrameBufferSoft::createScreen()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cls();
|
myOSystem->eventHandler().refreshDisplay();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: OSystemUNIX.cxx,v 1.17 2006-03-17 19:44:19 stephena Exp $
|
// $Id: OSystemUNIX.cxx,v 1.18 2006-03-17 23:06:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -174,6 +174,12 @@ uInt32 OSystemUNIX::getTicks()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void OSystemUNIX::getScreenDimensions(int& width, int& height)
|
void OSystemUNIX::getScreenDimensions(int& width, int& height)
|
||||||
{
|
{
|
||||||
|
// We might need to temporarily enable VIDEO support to check
|
||||||
|
// screen dimensions
|
||||||
|
bool isAlreadyInitialized = (SDL_WasInit(SDL_INIT_VIDEO) & SDL_INIT_VIDEO) > 0;
|
||||||
|
if(!isAlreadyInitialized)
|
||||||
|
SDL_Init(SDL_INIT_VIDEO);
|
||||||
|
|
||||||
SDL_SysWMinfo myWMInfo;
|
SDL_SysWMinfo myWMInfo;
|
||||||
SDL_VERSION(&myWMInfo.version);
|
SDL_VERSION(&myWMInfo.version);
|
||||||
if(SDL_GetWMInfo(&myWMInfo) > 0 && myWMInfo.subsystem == SDL_SYSWM_X11)
|
if(SDL_GetWMInfo(&myWMInfo) > 0 && myWMInfo.subsystem == SDL_SYSWM_X11)
|
||||||
|
@ -185,4 +191,7 @@ void OSystemUNIX::getScreenDimensions(int& width, int& height)
|
||||||
DefaultScreen(myWMInfo.info.x11.display));
|
DefaultScreen(myWMInfo.info.x11.display));
|
||||||
myWMInfo.info.x11.unlock_func();
|
myWMInfo.info.x11.unlock_func();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isAlreadyInitialized)
|
||||||
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue