Skip to content

Commit

Permalink
Switch off STB thread local support.
Browse files Browse the repository at this point in the history
Quake II is a single threaded application, so we don't require STB to be
thread save. Omitting thread local support prevents mingw from requiring
pthreads.
  • Loading branch information
Yamagi committed Jun 13, 2022
1 parent ed0b80a commit 6729698
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/files/stb.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#define STBI_MALLOC(sz) malloc(sz)
#define STBI_REALLOC(p,sz) realloc(p,sz)
#define STBI_FREE(p) free(p)
// Switch of the thread local stuff. Breaks mingw under Windows.
#define STBI_NO_THREAD_LOCALS
// include implementation part of stb_image into this file
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
Expand Down

0 comments on commit 6729698

Please sign in to comment.