mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-26 15:33:40 +00:00
[client] wayland: allow EGL/OpenGL vsync to be set to on
This effectively reverts4bceaf5
. Upstream ticket: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4180 Commit941c651
makes working around the hang in LG itself not as annoying as before. In the future, we can bypass this entire issue by implementing our own swapchain and listening to frame callbacks ourselves.
This commit is contained in:
parent
32d8a47cd9
commit
637a7625d2
@ -103,17 +103,6 @@ struct Inst
|
|||||||
LG_FontObj fontObj;
|
LG_FontObj fontObj;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool egl_vsync_option_validator(struct Option * opt, const char ** error)
|
|
||||||
{
|
|
||||||
if (opt->value.x_bool && getenv("WAYLAND_DISPLAY"))
|
|
||||||
{
|
|
||||||
DEBUG_WARN("Cannot disable vsync on Wayland, forcing egl:vsync=off");
|
|
||||||
opt->value.x_bool = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct Option egl_options[] =
|
static struct Option egl_options[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@ -122,7 +111,6 @@ static struct Option egl_options[] =
|
|||||||
.description = "Enable vsync",
|
.description = "Enable vsync",
|
||||||
.type = OPTION_TYPE_BOOL,
|
.type = OPTION_TYPE_BOOL,
|
||||||
.value.x_bool = false,
|
.value.x_bool = false,
|
||||||
.validator = &egl_vsync_option_validator
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.module = "egl",
|
.module = "egl",
|
||||||
|
@ -48,17 +48,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
#define FADE_TIME 1000000
|
#define FADE_TIME 1000000
|
||||||
|
|
||||||
static bool opengl_vsync_option_validator(struct Option * opt, const char ** error)
|
|
||||||
{
|
|
||||||
if (opt->value.x_bool && getenv("WAYLAND_DISPLAY"))
|
|
||||||
{
|
|
||||||
DEBUG_WARN("Cannot disable vsync on Wayland, forcing opengl:vsync=off");
|
|
||||||
opt->value.x_bool = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct Option opengl_options[] =
|
static struct Option opengl_options[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@ -74,7 +63,6 @@ static struct Option opengl_options[] =
|
|||||||
.description = "Enable vsync",
|
.description = "Enable vsync",
|
||||||
.type = OPTION_TYPE_BOOL,
|
.type = OPTION_TYPE_BOOL,
|
||||||
.value.x_bool = false,
|
.value.x_bool = false,
|
||||||
.validator = &opengl_vsync_option_validator
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.module = "opengl",
|
.module = "opengl",
|
||||||
|
Loading…
Reference in New Issue
Block a user