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;