mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-31 23:41:25 +00:00
Convert stb_image_write.h to Q_fopen() to be able to create screenshots.
This commit is contained in:
parent
6b13d77c36
commit
3b810ba51e
1 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ static int stbi__start_write_file(stbi__write_context *s, const char *filename)
|
|||
if (fopen_s(&f, filename, "wb"))
|
||||
f = NULL;
|
||||
#else
|
||||
f = fopen(filename, "wb");
|
||||
f = Q_fopen(filename, "wb");
|
||||
#endif
|
||||
stbi__start_write_callbacks(s, stbi__stdio_write, (void *) f);
|
||||
return f != NULL;
|
||||
|
@ -1108,7 +1108,7 @@ STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const
|
|||
if (fopen_s(&f, filename, "wb"))
|
||||
f = NULL;
|
||||
#else
|
||||
f = fopen(filename, "wb");
|
||||
f = Q_fopen(filename, "wb");
|
||||
#endif
|
||||
if (!f) { STBIW_FREE(png); return 0; }
|
||||
fwrite(png, 1, len, f);
|
||||
|
|
Loading…
Reference in a new issue