mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-07 09:05:18 +00:00
GL: small refactoring
This commit is contained in:
@@ -286,12 +286,6 @@ void * display_gl_init(char *fmt, unsigned int flags) {
|
||||
UNUSED(flags);
|
||||
struct state_gl *s;
|
||||
|
||||
#ifndef HAVE_MACOSX
|
||||
x11_enter_thread();
|
||||
#endif
|
||||
|
||||
glutInit(&uv_argc, uv_argv);
|
||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
|
||||
s = (struct state_gl *) calloc(1,sizeof(struct state_gl));
|
||||
s->magic = MAGIC_GL;
|
||||
|
||||
@@ -360,8 +354,13 @@ void * display_gl_init(char *fmt, unsigned int flags) {
|
||||
/* Startup function to call when running Cocoa code from a Carbon application. Whatever the fuck that means. */
|
||||
/* Avoids uncaught exception (1002) when creating CGSWindow */
|
||||
NSApplicationLoad();
|
||||
#else
|
||||
x11_enter_thread();
|
||||
#endif
|
||||
|
||||
glutInit(&uv_argc, uv_argv);
|
||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
|
||||
|
||||
#ifndef HAVE_MACOSX
|
||||
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user