Bug fix: Create OpenGL context only after initializing overlay
- Create OpenGL context only after initializing overlay, which fixes a bug that --paint-on-overlay does not work with OpenGL VSync. Thanks to tsmithe for reporting. (#7)
This commit is contained in:
parent
aace60be59
commit
4bc3de81ab
|
@ -5863,6 +5863,14 @@ session_init(session_t *ps_old, int argc, char **argv) {
|
||||||
ps->o.dbe = false;
|
ps->o.dbe = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Overlay must be initialized before double buffer, and before creation
|
||||||
|
// of OpenGL context.
|
||||||
|
if (ps->o.paint_on_overlay)
|
||||||
|
init_overlay(ps);
|
||||||
|
|
||||||
|
if (ps->o.dbe && !init_dbe(ps))
|
||||||
|
exit(1);
|
||||||
|
|
||||||
// Initialize software optimization
|
// Initialize software optimization
|
||||||
if (ps->o.sw_opti)
|
if (ps->o.sw_opti)
|
||||||
ps->o.sw_opti = swopti_init(ps);
|
ps->o.sw_opti = swopti_init(ps);
|
||||||
|
@ -5871,13 +5879,6 @@ session_init(session_t *ps_old, int argc, char **argv) {
|
||||||
if (!vsync_init(ps))
|
if (!vsync_init(ps))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
// Overlay must be initialized before double buffer
|
|
||||||
if (ps->o.paint_on_overlay)
|
|
||||||
init_overlay(ps);
|
|
||||||
|
|
||||||
if (ps->o.dbe && !init_dbe(ps))
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
// Create registration window
|
// Create registration window
|
||||||
if (!ps->reg_win && !register_cm(ps))
|
if (!ps->reg_win && !register_cm(ps))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue