mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 16:16:05 +00:00
DolphinWX: Clean up brace placements
This commit is contained in:
parent
844d45b26e
commit
8553b0f27b
13 changed files with 58 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue