comparison render_sdl.c @ 2638:f5603b4ee14d

Fixup some ifdefs to allow building for some more targets
author Michael Pavone <pavone@retrodev.com>
date Wed, 26 Feb 2025 20:45:40 -0800
parents 251cc75574af
children c30e5548154f
comparison
equal deleted inserted replaced
2637:47e197d40ffe 2638:f5603b4ee14d
1515 } 1515 }
1516 #endif 1516 #endif
1517 free(path); 1517 free(path);
1518 } 1518 }
1519 1519
1520 #ifndef __EMSCRIPTEN__ 1520 #ifdef GL_DEBUG_OUTPUT
1521 void GLAPIENTRY gl_message_callback(GLenum source, GLenum type, GLenum id, GLenum severity, GLsizei length, const GLchar *message, const void *user) 1521 void GLAPIENTRY gl_message_callback(GLenum source, GLenum type, GLenum id, GLenum severity, GLsizei length, const GLchar *message, const void *user)
1522 { 1522 {
1523 fprintf(stderr, "GL Message: %d, %d, %d - %s\n", source, type, severity, message); 1523 fprintf(stderr, "GL Message: %d, %d, %d - %s\n", source, type, severity, message);
1524 } 1524 }
1525 #endif 1525 #endif
1561 extras[win_idx].height = height; 1561 extras[win_idx].height = height;
1562 #ifndef DISABLE_OPENGL 1562 #ifndef DISABLE_OPENGL
1563 if (render_gl) { 1563 if (render_gl) {
1564 extras[win_idx].gl_context = SDL_GL_CreateContext(extras[win_idx].win); 1564 extras[win_idx].gl_context = SDL_GL_CreateContext(extras[win_idx].win);
1565 SDL_GL_MakeCurrent(extras[win_idx].win, extras[win_idx].gl_context); 1565 SDL_GL_MakeCurrent(extras[win_idx].win, extras[win_idx].gl_context);
1566 #ifndef __EMSCRIPTEN__ 1566 #ifdef GL_DEBUG_OUTPUT
1567 glEnable(GL_DEBUG_OUTPUT); 1567 glEnable(GL_DEBUG_OUTPUT);
1568 if (glDebugMessageCallback) { 1568 if (glDebugMessageCallback) {
1569 glDebugMessageCallback(gl_message_callback, NULL); 1569 glDebugMessageCallback(gl_message_callback, NULL);
1570 } 1570 }
1571 #endif 1571 #endif