From 41a48b8ac865dc20cf13f1526c607ec87f1fc733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Tue, 27 Jan 2015 20:16:08 -0300 Subject: [PATCH 1/5] Rename netplay_compat.* to net_compat.* --- Makefile.common | 2 +- command.c | 2 +- griffin/griffin.c | 2 +- logger/netlogger/logger.c | 2 +- netplay_compat.c => net_compat.c | 2 +- netplay_compat.h => net_compat.h | 0 net_http.c | 2 +- netplay.c | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename netplay_compat.c => net_compat.c (99%) rename netplay_compat.h => net_compat.h (100%) diff --git a/Makefile.common b/Makefile.common index 7fc1759ec3..6e6436d3d3 100644 --- a/Makefile.common +++ b/Makefile.common @@ -623,7 +623,7 @@ endif ifeq ($(HAVE_NETPLAY), 1) DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD OBJ += netplay.o \ - netplay_compat.o \ + net_compat.o \ net_http.o ifneq ($(findstring Win32,$(OS)),) LIBS += -lws2_32 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" From 1399fd99011fcf19a42c3f94e7ed7a1cc3d9b4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Tue, 27 Jan 2015 20:29:47 -0300 Subject: [PATCH 2/5] (qb) Separate socket library availability from netplay support --- Makefile.common | 15 ++++++++++----- qb/config.libs.sh | 7 ++++--- qb/config.params.sh | 3 ++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile.common b/Makefile.common index 6e6436d3d3..772ee395c7 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 \ - net_compat.o \ - net_http.o +ifeq ($(HAVE_NETWORK), 1) + DEFINES += -DHAVE_NETWORK + 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/qb/config.libs.sh b/qb/config.libs.sh index 45fe114269..d394016274 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -135,9 +135,9 @@ else check_lib DYLIB "$DYLIB" dlopen fi -check_lib NETPLAY "$SOCKETLIB" socket "" "$SOCKETHEADER" +check_lib NETWORK "$SOCKETLIB" socket "" "$SOCKETHEADER" -if [ "$HAVE_NETPLAY" = 'yes' ]; then +if [ "$HAVE_NETWORK" = 'yes' ]; then HAVE_GETADDRINFO=auto check_lib GETADDRINFO "$SOCKETLIB" getaddrinfo if [ "$HAVE_GETADDRINFO" = 'yes' ]; then @@ -148,6 +148,7 @@ if [ "$HAVE_NETPLAY" = 'yes' ]; then HAVE_NETWORK_CMD='yes' else HAVE_NETWORK_CMD='no' + HAVE_NETPLAY='no' fi check_lib STDIN_CMD "$CLIB" fcntl @@ -344,6 +345,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 NETWORK 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..75aa79fcf0 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_NETWORK=auto # Enable networking features +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 From 591cb56e6d0bfbdbdd7b1be01cff6e21f4e0b5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Tue, 27 Jan 2015 20:49:43 -0300 Subject: [PATCH 3/5] (qb) Rename NETWORK to NETWORKING --- Makefile.common | 4 ++-- qb/config.libs.sh | 6 +++--- qb/config.params.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.common b/Makefile.common index 772ee395c7..38228a7521 100644 --- a/Makefile.common +++ b/Makefile.common @@ -620,8 +620,8 @@ endif # Netplay -ifeq ($(HAVE_NETWORK), 1) - DEFINES += -DHAVE_NETWORK +ifeq ($(HAVE_NETWORKING), 1) + DEFINES += -DHAVE_NETWORKING OBJ += net_compat.o ifneq ($(findstring Win32,$(OS)),) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index d394016274..79cb66bfd1 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -135,9 +135,9 @@ else check_lib DYLIB "$DYLIB" dlopen fi -check_lib NETWORK "$SOCKETLIB" socket "" "$SOCKETHEADER" +check_lib NETWORKING "$SOCKETLIB" socket "" "$SOCKETHEADER" -if [ "$HAVE_NETWORK" = 'yes' ]; then +if [ "$HAVE_NETWORKING" = 'yes' ]; then HAVE_GETADDRINFO=auto check_lib GETADDRINFO "$SOCKETLIB" getaddrinfo if [ "$HAVE_GETADDRINFO" = 'yes' ]; then @@ -345,6 +345,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 NETWORK 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 75aa79fcf0..a144442466 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -12,7 +12,7 @@ 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_NETWORK=auto # Enable networking features +HAVE_NETWORKING=auto # Enable networking features (not recommended) HAVE_NETPLAY=auto # Enable netplay support (requires networking) HAVE_D3D9=yes # Disable Direct3D 9 support HAVE_OPENGL=yes # Disable OpenGL support From 38fb0beaaeea86c5e2a50204880415488d3ea2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Tue, 27 Jan 2015 20:50:55 -0300 Subject: [PATCH 4/5] (qb) Better configure messages --- qb/config.libs.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 79cb66bfd1..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 @@ -147,6 +147,7 @@ if [ "$HAVE_NETWORKING" = 'yes' ]; then fi HAVE_NETWORK_CMD='yes' else + echo "Warning: All networking features have been disabled." HAVE_NETWORK_CMD='no' HAVE_NETPLAY='no' fi @@ -162,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 @@ -190,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 @@ -228,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 @@ -244,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 @@ -258,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 @@ -270,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 @@ -317,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 From 7aeab17c5ef95d6e347fc55d2b6e9f342236b514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Tue, 27 Jan 2015 20:54:49 -0300 Subject: [PATCH 5/5] (qb) Fix typo --- qb/config.params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index a144442466..a054396b41 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -12,7 +12,7 @@ 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_NETWORKING=auto # Enable networking features (not recommended) +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