diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index 549e817ec..478cdbf47 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -350,7 +350,9 @@ static void deposterizeV(u32* data, u32* out, int w, int h, int l, int u) { void parallelize(const std::function &func, int start, int end, int width /* = 0 */) { - int tcount = max(1, omp_get_num_procs() - 1); + int tcount = omp_get_num_procs() - 1; + if (tcount < 1) + tcount = 1; tcount = min(tcount, (int)settings.pvr.MaxThreads); #pragma omp parallel num_threads(tcount) { diff --git a/shell/linux/Makefile b/shell/linux/Makefile index ba1cb5533..f10bcb96f 100644 --- a/shell/linux/Makefile +++ b/shell/linux/Makefile @@ -236,9 +236,9 @@ endif RZDCY_SRC_DIR = $(LOCAL_PATH)/../../core include $(RZDCY_SRC_DIR)/core.mk -LDFLAGS += -g -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common +LDFLAGS += -g -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common -fopenmp -CFLAGS += -g -O3 -D RELEASE -c -D USES_HOMEDIR #-D NO_REND +CFLAGS += -g -O3 -D RELEASE -c -D USES_HOMEDIR -fopenmp #-D NO_REND CFLAGS += -frename-registers -fno-strict-aliasing CFLAGS += -ffast-math -ftree-vectorize @@ -319,8 +319,7 @@ ifdef USE_PULSEAUDIO endif ifdef HAS_SOFTREND - CFLAGS += -fopenmp -msse4.1 - LDFLAGS += -fopenmp + CFLAGS += -msse4.1 endif # these are also handled on core.mk, but ignored here