From b439c59d85fbf856391b76b90386947d15e2af0e Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 3 Feb 2022 03:21:18 -0800 Subject: [PATCH] Upload miss code fixed CI --- base/bitmap_free_c.h | 2 +- base/xdisplay_c.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/bitmap_free_c.h b/base/bitmap_free_c.h index 2c97af9..803037f 100644 --- a/base/bitmap_free_c.h +++ b/base/bitmap_free_c.h @@ -2,7 +2,7 @@ #include #include -MMBitmapRef createMMBitmap_c(uint8_t *buffer, size_t width, size_t height, +MMBitmapRef createMMBitmap_c(uint8_t *buffer, int32_t width, int32_t height, size_t bytewidth, uint8_t bitsPerPixel, uint8_t bytesPerPixel ) { MMBitmapRef bitmap = malloc(sizeof(MMBitmap)); diff --git a/base/xdisplay_c.h b/base/xdisplay_c.h index fa455b2..0c0dedb 100644 --- a/base/xdisplay_c.h +++ b/base/xdisplay_c.h @@ -8,6 +8,13 @@ static int registered = 0; static char *displayName = NULL; static int hasDisplayNameChanged = 0; +void XCloseMainDisplay(void) { + if (mainDisplay != NULL) { + XCloseDisplay(mainDisplay); + mainDisplay = NULL; + } +} + Display *XGetMainDisplay(void) { /* Close the display if displayName has changed */ if (hasDisplayNameChanged) { @@ -40,13 +47,6 @@ Display *XGetMainDisplay(void) { return mainDisplay; } -void XCloseMainDisplay(void) { - if (mainDisplay != NULL) { - XCloseDisplay(mainDisplay); - mainDisplay = NULL; - } -} - void setXDisplay(char *name) { displayName = strdup(name); hasDisplayNameChanged = 1;