diff --git a/Makefile.common b/Makefile.common index 7fc1759ec3..38228a7521 100644 --- a/Makefile.common +++ b/Makefile.common @@ -620,14 +620,19 @@ endif # Netplay -ifeq ($(HAVE_NETPLAY), 1) - DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD - OBJ += netplay.o \ - netplay_compat.o \ - net_http.o +ifeq ($(HAVE_NETWORKING), 1) + DEFINES += -DHAVE_NETWORKING + OBJ += net_compat.o + ifneq ($(findstring Win32,$(OS)),) LIBS += -lws2_32 endif + + ifeq ($(HAVE_NETPLAY), 1) + DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD + OBJ += netplay.o \ + net_http.o + endif endif ifneq ($(findstring Win32,$(OS)),) diff --git a/command.c b/command.c index 2fde7e1a26..8a7c4e6deb 100644 --- a/command.c +++ b/command.c @@ -16,8 +16,8 @@ #include "command.h" +#include "net_compat.h" #if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY) -#include "netplay_compat.h" #include "netplay.h" #endif diff --git a/griffin/griffin.c b/griffin/griffin.c index 6a262568d4..785d52376e 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -661,7 +661,7 @@ NETPLAY ============================================================ */ #ifdef HAVE_NETPLAY #include "../netplay.c" -#include "../netplay_compat.c" +#include "../net_compat.c" #include "../net_http.c" #endif diff --git a/logger/netlogger/logger.c b/logger/netlogger/logger.c index 753a557547..8710d68f1e 100644 --- a/logger/netlogger/logger.c +++ b/logger/netlogger/logger.c @@ -35,7 +35,7 @@ #include #ifndef GEKKO -#include "../../netplay_compat.h" +#include "../../net_compat.h" #endif #include "logger.h" diff --git a/netplay_compat.c b/net_compat.c similarity index 99% rename from netplay_compat.c rename to net_compat.c index c8a29d6eb5..e2cb0d40be 100644 --- a/netplay_compat.c +++ b/net_compat.c @@ -14,7 +14,7 @@ * If not, see . */ -#include "netplay_compat.h" +#include "net_compat.h" #include "netplay.h" #include #include diff --git a/netplay_compat.h b/net_compat.h similarity index 100% rename from netplay_compat.h rename to net_compat.h diff --git a/net_http.c b/net_http.c index 335fe52ccb..5e4a73e0d9 100644 --- a/net_http.c +++ b/net_http.c @@ -18,7 +18,7 @@ #include #include #include -#include "netplay_compat.h" +#include "net_compat.h" #include enum diff --git a/netplay.c b/netplay.c index 3e7bab1eb6..16db644802 100644 --- a/netplay.c +++ b/netplay.c @@ -18,7 +18,7 @@ #pragma comment(lib, "ws2_32") #endif -#include "netplay_compat.h" +#include "net_compat.h" #include "netplay.h" #include "general.h" #include "autosave.h" diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 45fe114269..ddf4ce7f7c 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -55,7 +55,7 @@ if [ "$HAVE_7ZIP" = "yes" ]; then fi if [ "$HAVE_PRESERVE_DYLIB" = "yes" ]; then - echo "Disabling dlclose() of shared objects for Valgrind support." + echo "Notice: Disabling dlclose() of shared objects for Valgrind support." add_define_make HAVE_PRESERVE_DYLIB "1" fi @@ -111,7 +111,7 @@ if [ "$HAVE_EXYNOS" != "no" ]; then fi if [ "$LIBRETRO" ]; then - echo "Explicit libretro used, disabling dynamic libretro loading ..." + echo "Notice: Explicit libretro used, disabling dynamic libretro loading ..." HAVE_DYNAMIC='no' else LIBRETRO="-lretro" fi @@ -135,9 +135,9 @@ else check_lib DYLIB "$DYLIB" dlopen fi -check_lib NETPLAY "$SOCKETLIB" socket "" "$SOCKETHEADER" +check_lib NETWORKING "$SOCKETLIB" socket "" "$SOCKETHEADER" -if [ "$HAVE_NETPLAY" = 'yes' ]; then +if [ "$HAVE_NETWORKING" = 'yes' ]; then HAVE_GETADDRINFO=auto check_lib GETADDRINFO "$SOCKETLIB" getaddrinfo if [ "$HAVE_GETADDRINFO" = 'yes' ]; then @@ -147,7 +147,9 @@ if [ "$HAVE_NETPLAY" = 'yes' ]; then fi HAVE_NETWORK_CMD='yes' else + echo "Warning: All networking features have been disabled." HAVE_NETWORK_CMD='no' + HAVE_NETPLAY='no' fi check_lib STDIN_CMD "$CLIB" fcntl @@ -161,7 +163,7 @@ fi check_lib GETOPT_LONG "$CLIB" getopt_long if [ "$HAVE_DYLIB" = 'no' ] && [ "$HAVE_DYNAMIC" = 'yes' ]; then - echo "Dynamic loading of libretro is enabled, but your platform does not appear to have dlopen(), use --disable-dynamic or --with-libretro=\"-lretro\"". + echo "Error: Dynamic loading of libretro is enabled, but your platform does not appear to have dlopen(), use --disable-dynamic or --with-libretro=\"-lretro\"". exit 1 fi @@ -189,10 +191,10 @@ check_pkgconf SDL2 sdl2 2.0.0 if [ "$HAVE_SDL2" = 'yes' ]; then if [ "$HAVE_SDL2" = 'yes' ] && [ "$HAVE_SDL" = 'yes' ]; then - echo "SDL drivers will be replaced by SDL2 ones." + echo "Notice: SDL drivers will be replaced by SDL2 ones." HAVE_SDL=no elif [ "$HAVE_SDL2" = 'no' ]; then - echo "SDL2 not found, skipping." + echo "Warning: SDL2 not found, skipping." HAVE_SDL2=no fi fi @@ -227,7 +229,7 @@ if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_GLES" != 'yes' ]; then # fix undefined variables PKG_CONF_USED="$PKG_CONF_USED CG" else - echo "Ignoring Cg. Desktop OpenGL is not enabled." + echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled." HAVE_CG='no' fi @@ -243,7 +245,7 @@ if [ "$HAVE_THREADS" != 'no' ]; then ( [ "$HAVE_FFMPEG" = 'auto' ] && ( [ "$HAVE_AVCODEC" = 'no' ] || [ "$HAVE_AVFORMAT" = 'no' ] || [ "$HAVE_AVUTIL" = 'no' ] || [ "$HAVE_SWSCALE" = 'no' ] ) && HAVE_FFMPEG='no' ) || HAVE_FFMPEG='yes' fi else - echo "Not building with threading support. Will skip FFmpeg." + echo "Notice: Not building with threading support. Will skip FFmpeg." HAVE_FFMPEG='no' fi @@ -257,7 +259,7 @@ if [ "$HAVE_KMS" != "no" ]; then if [ "$HAVE_GBM" = "yes" ] && [ "$HAVE_DRM" = "yes" ] && [ "$HAVE_EGL" = "yes" ]; then HAVE_KMS=yes elif [ "$HAVE_KMS" = "yes" ]; then - echo "Cannot find libgbm, libdrm and EGL libraries required for KMS. Compile without --enable-kms." + echo "Error: Cannot find libgbm, libdrm and EGL libraries required for KMS. Compile without --enable-kms." exit 1 else HAVE_KMS=no @@ -269,7 +271,7 @@ check_pkgconf LIBXML2 libxml-2.0 if [ "$HAVE_EGL" = "yes" ]; then if [ "$HAVE_GLES" != "no" ]; then if [ "$GLES_LIBS" ] || [ "$GLES_CFLAGS" ]; then - echo "Using custom OpenGLES CFLAGS ($GLES_CFLAGS) and LDFLAGS ($GLES_LIBS)." + echo "Notice: Using custom OpenGLES CFLAGS ($GLES_CFLAGS) and LDFLAGS ($GLES_LIBS)." add_define_make GLES_LIBS "$GLES_LIBS" add_define_make GLES_CFLAGS "$GLES_CFLAGS" else @@ -316,7 +318,7 @@ check_pkgconf XINERAMA xinerama if [ "$HAVE_X11" = 'yes' ] && [ "$HAVE_XEXT" = 'yes' ] && [ "$HAVE_XF86VM" = 'yes' ]; then check_pkgconf XVIDEO xv else - echo "X11, Xext or xf86vm not present. Skipping X11 code paths." + echo "Notice: X11, Xext or xf86vm not present. Skipping X11 code paths." HAVE_X11='no' HAVE_XVIDEO='no' fi @@ -344,6 +346,6 @@ add_define_make OS "$OS" # Creates config.mk and config.h. add_define_make GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR" -VARS="RGUI LAKKA GLUI XMB ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL SDL2 D3D9 DINPUT WINXINPUT DSOUND XAUDIO OPENGL EXYNOS OMAP GLES GLES3 VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XKBCOMMON XVIDEO X11 XEXT XF86VM XINERAMA WAYLAND MALI_FBDEV VIVANTE_FBDEV NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL STRCASESTR MMAP PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON FLOATHARD FLOATSOFTFP UDEV V4L2 AV_CHANNEL_LAYOUT 7ZIP PARPORT" +VARS="RGUI LAKKA GLUI XMB ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL SDL2 D3D9 DINPUT WINXINPUT DSOUND XAUDIO OPENGL EXYNOS OMAP GLES GLES3 VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XKBCOMMON XVIDEO X11 XEXT XF86VM XINERAMA WAYLAND MALI_FBDEV VIVANTE_FBDEV NETWORKING NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL STRCASESTR MMAP PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON FLOATHARD FLOATSOFTFP UDEV V4L2 AV_CHANNEL_LAYOUT 7ZIP PARPORT" create_config_make config.mk $VARS create_config_header config.h $VARS diff --git a/qb/config.params.sh b/qb/config.params.sh index 02dcc2f06c..a054396b41 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -12,7 +12,8 @@ HAVE_GLES_CFLAGS= # C-flags for custom GLES library HAVE_THREADS=auto # Threading support HAVE_FFMPEG=auto # Enable FFmpeg recording support HAVE_DYLIB=auto # Enable dynamic loading support -HAVE_NETPLAY=auto # Enable netplay support +HAVE_NETWORKING=auto # Enable networking features (recommended) +HAVE_NETPLAY=auto # Enable netplay support (requires networking) HAVE_D3D9=yes # Disable Direct3D 9 support HAVE_OPENGL=yes # Disable OpenGL support HAVE_GLES=no # Use GLESv2 instead of desktop GL