OpenGL: use FFOpenGLOptions in detection code

This commit is contained in:
李通洲
2023-08-24 09:55:00 +08:00
parent b1ac31f590
commit bc6ed4f4a2
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -13,6 +13,6 @@ typedef struct FFOpenGLResult
FFstrbuf slv;
} FFOpenGLResult;
const char* ffDetectOpenGL(FFOpenGLResult* result);
const char* ffDetectOpenGL(FFOpenGLOptions* options, FFOpenGLResult* result);
#endif
+1 -1
View File
@@ -35,7 +35,7 @@ static const char* cglHandlePixelFormat(FFOpenGLResult* result, CGLPixelFormatOb
return error;
}
const char* ffDetectOpenGL(FFOpenGLResult* result)
const char* ffDetectOpenGL(FF_MAYBE_UNUSED FFOpenGLOptions* options, FFOpenGLResult* result)
{
CGLPixelFormatObj pixelFormat;
CGLPixelFormatAttribute attrs[] = {
+4 -4
View File
@@ -314,11 +314,11 @@ static const char* osMesaPrint(FFOpenGLResult* result)
#endif //FF_HAVE_OSMESA
const char* ffDetectOpenGL(FFOpenGLResult* result)
const char* ffDetectOpenGL(FFOpenGLOptions* options, FFOpenGLResult* result)
{
#if FF_HAVE_GL
if(instance.config.openGL.library == FF_OPENGL_LIBRARY_GLX)
if(options->library == FF_OPENGL_LIBRARY_GLX)
{
#ifdef FF_HAVE_GLX
return glxPrint(result);
@@ -327,7 +327,7 @@ const char* ffDetectOpenGL(FFOpenGLResult* result)
#endif
}
if(instance.config.openGL.library == FF_OPENGL_LIBRARY_EGL)
if(options->library == FF_OPENGL_LIBRARY_EGL)
{
#ifdef FF_HAVE_EGL
return eglPrint(result);
@@ -336,7 +336,7 @@ const char* ffDetectOpenGL(FFOpenGLResult* result)
#endif
}
if(instance.config.openGL.library == FF_OPENGL_LIBRARY_OSMESA)
if(options->library == FF_OPENGL_LIBRARY_OSMESA)
{
#ifdef FF_HAVE_OSMESA
return osMesaPrint(result);
+1 -1
View File
@@ -82,7 +82,7 @@ LRESULT CALLBACK wglHandleWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
}
}
const char* ffDetectOpenGL(FFOpenGLResult* result)
const char* ffDetectOpenGL(FF_MAYBE_UNUSED FFOpenGLOptions* options, FFOpenGLResult* result)
{
MSG msg = {0};
WNDCLASSW wc = {
+1 -1
View File
@@ -14,7 +14,7 @@ void ffPrintOpenGL(FFOpenGLOptions* options)
ffStrbufInit(&result.vendor);
ffStrbufInit(&result.slv);
const char* error = ffDetectOpenGL(&result);
const char* error = ffDetectOpenGL(options, &result);
if(error)
{
ffPrintError(FF_OPENGL_MODULE_NAME, 0, &options->moduleArgs, "%s", error);