Swap control only works with OpenGL
This commit is contained in:
parent
e2182bb00b
commit
6195422c66
@ -4566,8 +4566,8 @@ static bool
|
|||||||
vsync_opengl_swc_init(session_t *ps) {
|
vsync_opengl_swc_init(session_t *ps) {
|
||||||
#ifdef CONFIG_OPENGL
|
#ifdef CONFIG_OPENGL
|
||||||
if (!bkend_use_glx(ps)) {
|
if (!bkend_use_glx(ps)) {
|
||||||
printf_errf("(): I'm afraid OpenGL swap control wouldn't help if you are "
|
printf_errf("(): OpenGL swap control requires the GLX backend.");
|
||||||
"not using GLX backend. You could try, nonetheless.");
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vsync_opengl_swc_swap_interval(ps, 1)) {
|
if (!vsync_opengl_swc_swap_interval(ps, 1)) {
|
||||||
@ -4631,7 +4631,8 @@ vsync_opengl_swc_deinit(session_t *ps) {
|
|||||||
bool
|
bool
|
||||||
vsync_init(session_t *ps) {
|
vsync_init(session_t *ps) {
|
||||||
// Mesa turns on swap control by default, undo that
|
// Mesa turns on swap control by default, undo that
|
||||||
vsync_opengl_swc_swap_interval(ps, 0);
|
if (bkend_use_glx(ps))
|
||||||
|
vsync_opengl_swc_swap_interval(ps, 0);
|
||||||
|
|
||||||
if (ps->o.vsync && VSYNC_FUNCS_INIT[ps->o.vsync]
|
if (ps->o.vsync && VSYNC_FUNCS_INIT[ps->o.vsync]
|
||||||
&& !VSYNC_FUNCS_INIT[ps->o.vsync](ps)) {
|
&& !VSYNC_FUNCS_INIT[ps->o.vsync](ps)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user