DolphinWX: Clean up brace placements

This commit is contained in:
Lioncash 2014-08-30 17:01:19 -04:00
commit 8553b0f27b
13 changed files with 58 additions and 28 deletions

View file

@ -39,20 +39,22 @@ bool cInterfaceAGL::Create(void *window_handle)
NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, NSOpenGLPFAAccelerated, 0 };
NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
initWithAttributes: attr];
if (fmt == nil) {
if (fmt == nil)
{
ERROR_LOG(VIDEO, "failed to create pixel format");
return false;
}
cocoaCtx = [[NSOpenGLContext alloc]
initWithFormat: fmt shareContext: nil];
cocoaCtx = [[NSOpenGLContext alloc] initWithFormat: fmt shareContext: nil];
[fmt release];
if (cocoaCtx == nil) {
if (cocoaCtx == nil)
{
ERROR_LOG(VIDEO, "failed to create context");
return false;
}
if (cocoaWin == nil) {
if (cocoaWin == nil)
{
ERROR_LOG(VIDEO, "failed to create window");
return false;
}

View file

@ -84,7 +84,9 @@ bool cInterfaceGLX::Create(void *window_handle)
}
}
else
{
NOTICE_LOG(VIDEO, "Got double buffered visual!");
}
// Create a GLX context.
ctx = glXCreateContext(dpy, vi, nullptr, GL_TRUE);

View file

@ -104,19 +104,26 @@ bool cInterfaceWGL::Create(void *window_handle)
int PixelFormat; // Holds The Results After Searching For A Match
if (!(hDC = GetDC(window_handle_reified))) {
if (!(hDC = GetDC(window_handle_reified)))
{
PanicAlert("(1) Can't create an OpenGL Device context. Fail.");
return false;
}
if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd))) {
if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd)))
{
PanicAlert("(2) Can't find a suitable PixelFormat.");
return false;
}
if (!SetPixelFormat(hDC, PixelFormat, &pfd)) {
if (!SetPixelFormat(hDC, PixelFormat, &pfd))
{
PanicAlert("(3) Can't set the PixelFormat.");
return false;
}
if (!(hRC = wglCreateContext(hDC))) {
if (!(hRC = wglCreateContext(hDC)))
{
PanicAlert("(4) Can't create an OpenGL rendering context.");
return false;
}

View file

@ -60,13 +60,14 @@ void cX11Window::XEventThread()
for (int num_events = XPending(dpy); num_events > 0; num_events--)
{
XNextEvent(dpy, &event);
switch (event.type) {
case ConfigureNotify:
XResizeWindow(dpy, win, event.xconfigure.width, event.xconfigure.height);
GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);
break;
default:
break;
switch (event.type)
{
case ConfigureNotify:
XResizeWindow(dpy, win, event.xconfigure.width, event.xconfigure.height);
GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);
break;
default:
break;
}
}
Common::SleepCurrentThread(20);