-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed IMG_Init() and IMG_Quit() #482
Conversation
avif side looks broken to me: --- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -214,3 +214,3 @@ bool IMG_isAVIF(SDL_IOStream *src)
/* This might be AVIF, do more thorough checks */
- if (!IMG_InitAVIF()) {
+ if (IMG_InitAVIF()) {
avifROData header;
@@ -368,3 +368,3 @@ SDL_Surface *IMG_LoadAVIF_IO(SDL_IOStream *src)
- if ((IMG_InitAVIF()) {
+ if (!IMG_InitAVIF()) {
return NULL; |
Yes indeed, thank you! |
@madebr, did I break CI here? |
No, it's the latest libjxl that decodes jxl images in another way, with a delta-color bigger then our tests allow. |
On the other hand, MSVC also fails which uses our vendored libjxl library. (We vendor an older version) |
--- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -118,3 +118,3 @@ static bool IMG_InitAVIF(void)
- return false;
+ return true;
}
diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index 2541d86..57e76d3 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -100,3 +100,3 @@ static bool IMG_InitWEBP(void)
- return false;
+ return true;
} |
IMG_Init() and IMG_Quit() are no longer necessary. If an image format requires dynamically loading a support library, that will be done automatically.
…(aka 'unsigned long') to 'int'
…essary ';' to silence this warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting various drivers to init on demand is good, but how do they clean up without an explicit quit? I saw one of these calls CoCreateInstance during init, for example.
They don't, but in practice I don't think unloading the image DLLs is that important these days. The WIC driver is the only one that does CoCreateInstance(), and I think we can potentially just drop that. |
No description provided.