Merge branch 'fix-garbage-pointer-dereference' of https://github.com/Luflosi/kitty into master
This commit is contained in:
@@ -421,6 +421,7 @@ make_os_window_context_current(OSWindow *w) {
|
|||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
get_window_content_scale(GLFWwindow *w, float *xscale, float *yscale, double *xdpi, double *ydpi) {
|
get_window_content_scale(GLFWwindow *w, float *xscale, float *yscale, double *xdpi, double *ydpi) {
|
||||||
|
*xscale = 1; *yscale = 1;
|
||||||
if (w) glfwGetWindowContentScale(w, xscale, yscale);
|
if (w) glfwGetWindowContentScale(w, xscale, yscale);
|
||||||
else {
|
else {
|
||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
@@ -440,7 +441,7 @@ get_window_content_scale(GLFWwindow *w, float *xscale, float *yscale, double *xd
|
|||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
get_window_dpi(GLFWwindow *w, double *x, double *y) {
|
get_window_dpi(GLFWwindow *w, double *x, double *y) {
|
||||||
float xscale = 1, yscale = 1;
|
float xscale, yscale;
|
||||||
get_window_content_scale(w, &xscale, &yscale, x, y);
|
get_window_content_scale(w, &xscale, &yscale, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user