Upload miss code fixed CI

This commit is contained in:
vcaesar 2022-02-03 03:21:18 -08:00
parent 5d460e5100
commit b439c59d85
2 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
#include <assert.h>
#include <string.h>
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));

View File

@ -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;