mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
...
This commit is contained in:
10
kitty/glfw.c
10
kitty/glfw.c
@@ -1638,11 +1638,12 @@ void cleanup_glfw(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
// constants {{{
|
||||
bool
|
||||
init_glfw(PyObject *m) {
|
||||
if (PyModule_AddFunctions(m, module_methods) != 0) return false;
|
||||
register_at_exit_cleanup_func(GLFW_CLEANUP_FUNC, cleanup_glfw);
|
||||
|
||||
// constants {{{
|
||||
#define ADDC(n) if(PyModule_AddIntConstant(m, #n, n) != 0) return false;
|
||||
ADDC(GLFW_RELEASE);
|
||||
ADDC(GLFW_PRESS);
|
||||
@@ -1884,9 +1885,8 @@ init_glfw(PyObject *m) {
|
||||
// ---
|
||||
ADDC(GLFW_CONNECTED);
|
||||
ADDC(GLFW_DISCONNECTED);
|
||||
|
||||
return true;
|
||||
#undef ADDC
|
||||
// }}}
|
||||
|
||||
return true;
|
||||
}
|
||||
// }}}
|
||||
// }}}
|
||||
|
||||
Reference in New Issue
Block a user