set g_X11Display
This commit is contained in:
@@ -5,6 +5,14 @@
|
|||||||
#include "RageDisplay.h" // for REFRESH_DEFAULT
|
#include "RageDisplay.h" // for REFRESH_DEFAULT
|
||||||
#include "StepMania.h"
|
#include "StepMania.h"
|
||||||
|
|
||||||
|
#if defined(UNIX)
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(UNIX)
|
||||||
|
extern Display *g_X11Display;
|
||||||
|
#endif
|
||||||
|
|
||||||
LowLevelWindow_SDL::LowLevelWindow_SDL()
|
LowLevelWindow_SDL::LowLevelWindow_SDL()
|
||||||
{
|
{
|
||||||
/* By default, ignore all SDL events. We'll enable them as we need them.
|
/* By default, ignore all SDL events. We'll enable them as we need them.
|
||||||
@@ -182,6 +190,19 @@ CString LowLevelWindow_SDL::TryVideoMode( RageDisplay::VideoModeParams p, bool &
|
|||||||
/* Recreating the window changes the hwnd. */
|
/* Recreating the window changes the hwnd. */
|
||||||
SDL_UpdateHWnd();
|
SDL_UpdateHWnd();
|
||||||
|
|
||||||
|
#if defined(unix)
|
||||||
|
{
|
||||||
|
SDL_SysWMinfo info;
|
||||||
|
SDL_VERSION(&info.version);
|
||||||
|
|
||||||
|
g_X11Display = NULL;
|
||||||
|
if ( SDL_GetWMInfo(&info) < 0 )
|
||||||
|
LOG->Warn("SDL_GetWMInfo failed: %s", SDL_GetError());
|
||||||
|
else
|
||||||
|
g_X11Display = info.info.x11.display;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Find out what we really got. */
|
/* Find out what we really got. */
|
||||||
int r,g,b,a, colorbits, depth, stencil;
|
int r,g,b,a, colorbits, depth, stencil;
|
||||||
|
|||||||
Reference in New Issue
Block a user