Skip to content

Commit

Permalink
Fix emscripten and linux failure with opengl not being usable
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Nov 27, 2024
1 parent 49f040f commit 3bbcd34
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/yup_gui/native/yup_Windowing_glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,20 @@ GraphicsContext::Api getGraphicsContextApi (const std::optional<GraphicsContext:
#elif YUP_RIVE_USE_OPENGL
desiredApi = forceContextApi.value_or(GraphicsContext::OpenGL);
#endif
#endif

#if JUCE_WINDOWS
#elif JUCE_WINDOWS
#if YUP_RIVE_USE_D3D
desiredApi = forceContextApi.value_or(GraphicsContext::Direct3D);
#elif YUP_RIVE_USE_OPENGL
desiredApi = forceContextApi.value_or(GraphicsContext::OpenGL);
#endif

#elif JUCE_LINUX
desiredApi = forceContextApi.value_or(GraphicsContext::OpenGL);

#else
desiredApi = forceContextApi.value_or(GraphicsContext::OpenGL);

#endif

return desiredApi;
Expand Down

0 comments on commit 3bbcd34

Please sign in to comment.