Only set swap interval once
This commit is contained in:
parent
cff79bc9d4
commit
c9446727d3
@ -533,6 +533,8 @@ create_os_window(PyObject UNUSED *self, PyObject *args) {
|
|||||||
cocoa_create_global_menu();
|
cocoa_create_global_menu();
|
||||||
// This needs to be done only after the first window has been created, because glfw only sets the activation policy once upon initialization.
|
// This needs to be done only after the first window has been created, because glfw only sets the activation policy once upon initialization.
|
||||||
if (OPT(macos_hide_from_tasks)) cocoa_set_hide_from_tasks();
|
if (OPT(macos_hide_from_tasks)) cocoa_set_hide_from_tasks();
|
||||||
|
#else
|
||||||
|
glfwSwapInterval(OPT(sync_to_monitor) && !global_state.is_wayland ? 1 : 0);
|
||||||
#endif
|
#endif
|
||||||
#define CC(dest, shape) {\
|
#define CC(dest, shape) {\
|
||||||
if (!dest##_cursor) { \
|
if (!dest##_cursor) { \
|
||||||
@ -566,8 +568,6 @@ create_os_window(PyObject UNUSED *self, PyObject *args) {
|
|||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
if (OPT(macos_option_as_alt)) glfwSetCocoaTextInputFilter(glfw_window, filter_option);
|
if (OPT(macos_option_as_alt)) glfwSetCocoaTextInputFilter(glfw_window, filter_option);
|
||||||
glfwSetCocoaToggleFullscreenIntercept(glfw_window, intercept_cocoa_fullscreen);
|
glfwSetCocoaToggleFullscreenIntercept(glfw_window, intercept_cocoa_fullscreen);
|
||||||
#else
|
|
||||||
glfwSwapInterval(OPT(sync_to_monitor) && !global_state.is_wayland ? 1 : 0);
|
|
||||||
#endif
|
#endif
|
||||||
send_prerendered_sprites_for_window(w);
|
send_prerendered_sprites_for_window(w);
|
||||||
if (logo.pixels && logo.width && logo.height) glfwSetWindowIcon(glfw_window, 1, &logo);
|
if (logo.pixels && logo.width && logo.height) glfwSetWindowIcon(glfw_window, 1, &logo);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user