Kaynağa Gözat

Added note for multi-threading web compilation

pull/2622/head
Ray 2 yıl önce
ebeveyn
işleme
d68ddda766
2 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. +2
    -0
      examples/Makefile.Web
  2. +1
    -0
      src/Makefile

+ 2
- 0
examples/Makefile.Web Dosyayı Görüntüle

@ -591,6 +591,8 @@ core/core_vr_simulator: core/core_vr_simulator.c
# NOTE: To use multi-threading raylib must be compiled with multi-theading support (-s USE_PTHREADS=1)
# WARNING: For security reasons multi-threading is not supported on browsers, it requires cross-origin isolation (Oct.2021)
# WARNING: It requires raylib to be compiled using -pthread, so atomic operations and thread-local data (if any)
# in its source were transformed to non-atomic operations and non-thread-local data
core/core_loading_thread: core/core_loading_thread.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s USE_PTHREADS=1

+ 1
- 0
src/Makefile Dosyayı Görüntüle

@ -316,6 +316,7 @@ ifneq ($(RAYLIB_CONFIG_FLAGS), NONE)
endif
ifeq ($(PLATFORM), PLATFORM_WEB)
# NOTE: When using multi-threading in the user code, it requires -pthread enabled
CFLAGS += -std=gnu99
else
CFLAGS += -std=c99

Yükleniyor…
İptal
Kaydet