Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable opengl for Wayland clients #76

Closed
Mystro256 opened this issue Feb 18, 2017 · 1 comment
Closed

Disable opengl for Wayland clients #76

Mystro256 opened this issue Feb 18, 2017 · 1 comment

Comments

@Mystro256
Copy link
Contributor

Just a tracker bug for an enhancement to disable opengl at runtime for Wayland clients.

Workaround for this WX bug:
http://trac.wxwidgets.org/ticket/17702

rkitover added a commit that referenced this issue Feb 20, 2017
Use a gdk call (part of gtk) to detect if the app is using Wayland, and
if so disable OpenGL, because wxGLCanvas segfaults under Wayland.

This requires linking to gtk libs, so add some cmake and installdeps
code for that.

If the user has opengl as the render method in their config, it will not
be changed, but at runtime will be set to simple under Wayland.

Call Refresh() to queue a PaintEv from DrawArea(data) instead of calling
DrawArea(device_context) directly. This fixes frames not displaying
under Wayland.

Remove the DrawOSD() call from PaintEv, this was causing the OSD to
sometimes show up twice in one frame, because DrawArea(data) draws the
OSD directly on the buffer.

Add new files wayland.cpp and wayland.h with a bool IsItWayland()
global function. This is where the aforementioned gdk call is.
rkitover added a commit that referenced this issue Feb 20, 2017
Use a gdk call (part of gtk) to detect if the app is using Wayland, and
if so disable OpenGL, because wxGLCanvas segfaults under Wayland.

This requires linking to gtk libs, so add some cmake and installdeps
code for that.

If the user has opengl as the render method in their config, it will not
be changed, but at runtime will be set to simple under Wayland.

Call Refresh() to queue a PaintEv from DrawArea(data) instead of calling
DrawArea(device_context) directly. This fixes frames not displaying
under Wayland.

Remove the DrawOSD() call from PaintEv, this was causing the OSD to
sometimes show up twice in one frame, because DrawArea(data) draws the
OSD directly on the buffer.

Add new files wayland.cpp and wayland.h with a bool IsItWayland()
global function. This is where the aforementioned gdk call is.
rkitover added a commit that referenced this issue Feb 20, 2017
Disable OpenGL support under Wayland because wxGLCanvas segfaults, and
fix an issue with drawn frames not appearing.

If the user has opengl as the render method in their config, it will not
be changed, but at runtime will be set to simple under Wayland.

To fix the issue with frames not being drawn, Call Refresh() to queue a
PaintEv from DrawArea(data) instead of calling DrawArea(device_context)
directly.

Also remove the DrawOSD() call from PaintEv, this was causing the OSD to
sometimes show up twice in one frame, because DrawArea(data) draws the
OSD directly on the frame data.

Add new files wayland.cpp and wayland.h with a bool IsItWayland() global
function. This uses a GDK (part of GTK) call to detect Wayland.  This
unfortunately requires linking GTK libs separately.

Add cmake code to detect the version of GTK used by the wx being linked
and link it as well. Add gtk2 and gtk3 dev packages to the code for the
supported linux dists in ./installdeps.
@rkitover
Copy link
Collaborator

Fixed in 6a7d494, closing.

rkitover pushed a commit that referenced this issue Aug 15, 2019
libretro: Update core options API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants