mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
[media] fix up oiio/null implementations
This commit is contained in:
parent
fceb0b5182
commit
7bcc68136d
@ -79,7 +79,7 @@ void none_printbanner(const notcurses* nc){
|
||||
fprintf(stderr, "\n Warning! Notcurses was built without multimedia support.\n");
|
||||
}
|
||||
|
||||
const static ncvisual_implementation none_impl = {
|
||||
static const ncvisual_implementation none_impl = {
|
||||
.visual_init = none_init,
|
||||
.visual_printbanner = none_printbanner,
|
||||
.visual_blit = none_blit,
|
||||
|
@ -18,7 +18,10 @@ typedef struct ncvisual_details {
|
||||
auto oiio_details_init(void) -> ncvisual_details* {
|
||||
auto deets = static_cast<ncvisual_details*>(malloc(sizeof(ncvisual_details)));
|
||||
if(deets){
|
||||
memset(deets, 0, sizeof(*deets));
|
||||
deets->image = nullptr;
|
||||
deets->frame = nullptr;
|
||||
deets->ibuf = nullptr;
|
||||
deets->framenum = 0;
|
||||
}
|
||||
return deets;
|
||||
}
|
||||
@ -31,7 +34,7 @@ auto oiio_details_destroy(ncvisual_details* deets) -> void {
|
||||
}
|
||||
|
||||
auto oiio_create() -> ncvisual* {
|
||||
auto nc = static_cast<ncvisual*>(malloc(sizeof(*nc)));
|
||||
auto nc = static_cast<ncvisual*>(malloc(sizeof(ncvisual)));
|
||||
if(nc){
|
||||
memset(nc, 0, sizeof(*nc));
|
||||
if((nc->details = oiio_details_init()) == nullptr){
|
||||
|
Loading…
Reference in New Issue
Block a user