-
Notifications
You must be signed in to change notification settings - Fork 902
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add capture multi screen support and update return, and remove unused…
… files
- Loading branch information
Showing
15 changed files
with
123 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#include "MMBitmap.h" | ||
#include <assert.h> | ||
#include <string.h> | ||
|
||
MMBitmapRef createMMBitmap_c( | ||
uint8_t *buffer, | ||
size_t width, | ||
size_t height, | ||
size_t bytewidth, | ||
uint8_t bitsPerPixel, | ||
uint8_t bytesPerPixel | ||
){ | ||
MMBitmapRef bitmap = malloc(sizeof(MMBitmap)); | ||
if (bitmap == NULL) { return NULL; } | ||
|
||
bitmap->imageBuffer = buffer; | ||
bitmap->width = width; | ||
bitmap->height = height; | ||
bitmap->bytewidth = bytewidth; | ||
bitmap->bitsPerPixel = bitsPerPixel; | ||
bitmap->bytesPerPixel = bytesPerPixel; | ||
|
||
return bitmap; | ||
} | ||
|
||
void destroyMMBitmap(MMBitmapRef bitmap) { | ||
assert(bitmap != NULL); | ||
|
||
if (bitmap->imageBuffer != NULL) { | ||
free(bitmap->imageBuffer); | ||
bitmap->imageBuffer = NULL; | ||
} | ||
|
||
free(bitmap); | ||
} | ||
|
||
void destroyMMBitmapBuffer(char * bitmapBuffer, void * hint) { | ||
if (bitmapBuffer != NULL) { | ||
free(bitmapBuffer); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.