simple cosmetic changes to match code style
This commit is contained in:
@@ -56,8 +56,6 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
|||||||
XEvent ev;
|
XEvent ev;
|
||||||
stack<XEvent> otherEvs;
|
stack<XEvent> otherEvs;
|
||||||
|
|
||||||
int i;
|
|
||||||
|
|
||||||
// XXX: LLW_SDL allows the window to be resized. Do we really want to?
|
// XXX: LLW_SDL allows the window to be resized. Do we really want to?
|
||||||
hints.flags = PMinSize | PMaxSize | PBaseSize;
|
hints.flags = PMinSize | PMaxSize | PBaseSize;
|
||||||
hints.min_width = hints.max_width = hints.base_width = p.width;
|
hints.min_width = hints.max_width = hints.base_width = p.width;
|
||||||
@@ -65,16 +63,13 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
|||||||
|
|
||||||
if( !windowIsOpen || p.bpp != CurrentParams.bpp )
|
if( !windowIsOpen || p.bpp != CurrentParams.bpp )
|
||||||
{
|
{
|
||||||
int visAttribs[32];
|
|
||||||
XVisualInfo *xvi;
|
|
||||||
GLXContext ctxt;
|
|
||||||
|
|
||||||
X11Helper::OpenMask( StructureNotifyMask );
|
X11Helper::OpenMask( StructureNotifyMask );
|
||||||
|
|
||||||
// Different depth, or we didn't make a window before. New context.
|
// Different depth, or we didn't make a window before. New context.
|
||||||
bNewDeviceOut = true;
|
bNewDeviceOut = true;
|
||||||
|
|
||||||
i = 0;
|
int visAttribs[32];
|
||||||
|
int i = 0;
|
||||||
ASSERT( p.bpp == 16 || p.bpp == 32 );
|
ASSERT( p.bpp == 16 || p.bpp == 32 );
|
||||||
if( p.bpp == 32 )
|
if( p.bpp == 32 )
|
||||||
{
|
{
|
||||||
@@ -95,10 +90,9 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
|||||||
|
|
||||||
visAttribs[i++] = None;
|
visAttribs[i++] = None;
|
||||||
|
|
||||||
xvi = glXChooseVisual(X11Helper::Dpy,
|
XVisualInfo *xvi = glXChooseVisual( X11Helper::Dpy, DefaultScreen(X11Helper::Dpy), visAttribs );
|
||||||
DefaultScreen(X11Helper::Dpy), visAttribs);
|
|
||||||
|
|
||||||
if(!xvi)
|
if( xvi == NULL )
|
||||||
{
|
{
|
||||||
return "No visual available for that depth.";
|
return "No visual available for that depth.";
|
||||||
}
|
}
|
||||||
@@ -113,7 +107,7 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
|||||||
XChangeProperty( g_X11Display, X11Helper::Win, XA_WM_NAME, XA_STRING, 8, PropModeReplace,
|
XChangeProperty( g_X11Display, X11Helper::Win, XA_WM_NAME, XA_STRING, 8, PropModeReplace,
|
||||||
reinterpret_cast<unsigned char*>(WindowTitle), strlen(WindowTitle) );
|
reinterpret_cast<unsigned char*>(WindowTitle), strlen(WindowTitle) );
|
||||||
|
|
||||||
ctxt = glXCreateContext(X11Helper::Dpy, xvi, NULL, True);
|
GLXContext ctxt = glXCreateContext(X11Helper::Dpy, xvi, NULL, True);
|
||||||
|
|
||||||
glXMakeCurrent( X11Helper::Dpy, X11Helper::Win, ctxt );
|
glXMakeCurrent( X11Helper::Dpy, X11Helper::Win, ctxt );
|
||||||
|
|
||||||
@@ -128,14 +122,11 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
|||||||
{
|
{
|
||||||
XNextEvent(X11Helper::Dpy, &ev);
|
XNextEvent(X11Helper::Dpy, &ev);
|
||||||
if( ev.type == MapNotify )
|
if( ev.type == MapNotify )
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
otherEvs.push(ev);
|
otherEvs.push(ev);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
while( !otherEvs.empty() )
|
while( !otherEvs.empty() )
|
||||||
{
|
{
|
||||||
XPutBackEvent( X11Helper::Dpy, &otherEvs.top() );
|
XPutBackEvent( X11Helper::Dpy, &otherEvs.top() );
|
||||||
|
|||||||
Reference in New Issue
Block a user