1. Richard Goedeken
  2. mupen64plus-video-glide64mk2

Commits

ecsv  committed 2b5f6cc

Allow to build without GlideHQ support
Some systems don't have the required boost support and would not be able to
compile glide64 without adding a lot of new dependencies to their build
environment.

  • Participants
  • Parent commits 4dc3807
  • Branches default

Comments (0)

Files changed (3)

File projects/unix/Makefile

View file
 LDFLAGS += $(SHARED)
 BOOST_SUFFIX ?=
 BOOST_THREAD_SUFFIX ?=
-LDLIBS += -lboost_filesystem$(BOOST_SUFFIX) -lboost_system$(BOOST_SUFFIX) -lboost_thread$(BOOST_THREAD_SUFFIX)
-
-ifeq ($(OS), MINGW)
-  CFLAGS += -DBOOST_THREAD_USE_LIB
-  LDLIBS += -lpthread
-else
-  CFLAGS += -pthread
-  LDLIBS += -pthread
-endif
 
 # default configuration programs
 SDL_CONFIG = $(CROSS_COMPILE)sdl-config
 	$(SRCDIR)/Glide64/rdp.cpp \
 	$(SRCDIR)/Glide64/TexBuffer.cpp \
 	$(SRCDIR)/Glide64/TexCache.cpp \
-	$(SRCDIR)/Glide64/Util.cpp \
+	$(SRCDIR)/Glide64/Util.cpp
+
+ifneq ($(HIRES), 0)
+SOURCE += \
 	$(SRCDIR)/GlideHQ/Ext_TxFilter.cpp \
 	$(SRCDIR)/GlideHQ/TxFilterExport.cpp \
 	$(SRCDIR)/GlideHQ/TxFilter.cpp \
 	$(SRCDIR)/GlideHQ/tc-1.1+/wrapper.c \
 	$(SRCDIR)/GlideHQ/tc-1.1+/texstore.c
 
+CFLAGS += -DTEXTURE_FILTER
+LDLIBS += -lboost_filesystem$(BOOST_SUFFIX) -lboost_system$(BOOST_SUFFIX) -lboost_thread$(BOOST_THREAD_SUFFIX)
+
+  ifeq ($(OS), MINGW)
+    CFLAGS += -DBOOST_THREAD_USE_LIB
+    LDLIBS += -lpthread
+  else
+    CFLAGS += -pthread
+    LDLIBS += -pthread
+  endif
+endif
+
 ifeq ($(OS),MINGW)
 SOURCE += $(SRCDIR)/Glide64/osal_dynamiclib_win32.c
 else
 	@echo "    WARNFLAGS=flag == compiler warning levels (default: -Wall)"
 	@echo "    PIC=(1|0)     == Force enable/disable of position independent code"
 	@echo "    POSTFIX=name  == String added to the name of the the build (default: '')"
+	@echo "    HIRES=(1|0)   == Enables/Disables support for hires textures and texture filters (default: 1)"
 	@echo "  Install Options:"
 	@echo "    PREFIX=path   == install/uninstall prefix (default: /usr/local)"
 	@echo "    SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"

File src/Glide64/TexCache.cpp

View file
   cache->f_mirror_t = FALSE;
   cache->f_wrap_s = FALSE;
   cache->f_wrap_t = FALSE;
+#ifdef TEXTURE_FILTER
   cache->is_hires_tex = FALSE;
-#ifdef TEXTURE_FILTER
   cache->ricecrc    = texinfo[id].ricecrc;
 #endif
 

File src/Glide64/rdp.h

View file
 extern wxUint32 frame_count; // frame counter
 
 //GlideHQ support
-#define TEXTURE_FILTER
 #ifdef TEXTURE_FILTER
 #include "../GlideHQ/Ext_TxFilter.h"
 #endif