|
25 | 25 | #define STRINGIFY(X) STRINGIFY2(X)
|
26 | 26 |
|
27 | 27 | #define GLFUNC(__type, __name) __type __name;
|
| 28 | +#define EGLFUNC(__type, __name) __type __name; |
28 | 29 | #include "Common/GLInclude/glFunctions.h"
|
29 | 30 | #undef GLFUNC
|
| 31 | +#undef EGLFUNC |
30 | 32 |
|
31 | 33 | #include "config/ActiveSettings.h"
|
32 | 34 | #include "config/LaunchSettings.h"
|
@@ -229,9 +231,17 @@ void LoadOpenGLImports()
|
229 | 231 | _glXGetProcAddress = (PFNGLXGETPROCADDRESSPROC)dlsym(libGL, "glXGetProcAddressARB");
|
230 | 232 | }
|
231 | 233 |
|
| 234 | + void* libEGL = dlopen("libEGL.so.1", RTLD_NOW | RTLD_GLOBAL); |
| 235 | + if(!libEGL) |
| 236 | + { |
| 237 | + libGL = dlopen("libEGL.so", RTLD_NOW | RTLD_GLOBAL); |
| 238 | + } |
| 239 | + |
232 | 240 | #define GLFUNC(__type, __name) __name = (__type)_GetOpenGLFunction(libGL, _glXGetProcAddress, STRINGIFY(__name));
|
| 241 | +#define EGLFUNC(__type, __name) __name = (__type)dlsym(libEGL, STRINGIFY(__name)); |
233 | 242 | #include "Common/GLInclude/glFunctions.h"
|
234 | 243 | #undef GLFUNC
|
| 244 | +#undef EGLFUNC |
235 | 245 | }
|
236 | 246 | #elif BOOST_OS_MACOS
|
237 | 247 | void LoadOpenGLImports()
|
@@ -352,20 +362,6 @@ void OpenGLRenderer::NotifyLatteCommandProcessorIdle()
|
352 | 362 | glFlush();
|
353 | 363 | }
|
354 | 364 |
|
355 |
| -void OpenGLRenderer::UpdateVSyncState() |
356 |
| -{ |
357 |
| - int configValue = GetConfig().vsync.GetValue(); |
358 |
| - if(m_activeVSyncState != configValue) |
359 |
| - { |
360 |
| -#if BOOST_OS_WINDOWS |
361 |
| - if(wglSwapIntervalEXT) |
362 |
| - wglSwapIntervalEXT(configValue); // 1 = enabled, 0 = disabled |
363 |
| -#else |
364 |
| - cemuLog_log(LogType::Force, "OpenGL vsync not implemented"); |
365 |
| -#endif |
366 |
| - m_activeVSyncState = configValue; |
367 |
| - } |
368 |
| -} |
369 | 365 |
|
370 | 366 | bool IsRunningInWine();
|
371 | 367 |
|
@@ -443,7 +439,6 @@ void OpenGLRenderer::EnableDebugMode()
|
443 | 439 | void OpenGLRenderer::SwapBuffers(bool swapTV, bool swapDRC)
|
444 | 440 | {
|
445 | 441 | GLCanvas_SwapBuffers(swapTV, swapDRC);
|
446 |
| - UpdateVSyncState(); |
447 | 442 |
|
448 | 443 | if (swapTV)
|
449 | 444 | cleanupAfterFrame();
|
|
0 commit comments