diff --git a/Makefile.common b/Makefile.common index 8188adc08b..0e254a3688 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1024,7 +1024,7 @@ ifeq ($(HAVE_NETWORKING), 1) # Netplay ifeq ($(HAVE_NETPLAY), 1) - DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD -DHAVE_NETWORK_GAMEPAD + DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD OBJ += network/netplay/netplay_net.o \ network/netplay/netplay_spectate.o \ network/netplay/netplay_common.o \ @@ -1040,7 +1040,7 @@ ifeq ($(HAVE_NETWORKING), 1) endif endif - ifeq ($(HAVE_NETWORK_GAMEPAD), 1) + ifeq ($(HAVE_NETWORKGAMEPAD), 1) OBJ += input/input_remote.o \ cores/libretro-net-retropad/net_retropad_core.o endif diff --git a/config.features.h b/config.features.h index 974f301091..de11691684 100644 --- a/config.features.h +++ b/config.features.h @@ -32,7 +32,7 @@ static const bool _network_command_supp = true; static const bool _network_command_supp = false; #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD static const bool _network_gamepad_supp = true; #else static const bool _network_gamepad_supp = false; diff --git a/configuration.c b/configuration.c index fbf5d42004..4b3dd9104f 100644 --- a/configuration.c +++ b/configuration.c @@ -1741,7 +1741,7 @@ static bool config_load_file(const char *path, bool set_defaults) settings->bluetooth_enable = path_file_exists(LAKKA_BLUETOOTH_PATH); #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD CONFIG_GET_BOOL_BASE(conf, settings, network_remote_enable, "network_remote_enable"); for (i = 0; i < MAX_USERS; i++) { @@ -2925,7 +2925,7 @@ bool config_save_file(const char *path) config_set_int(conf, cfg, settings->input.analog_dpad_mode[i]); } -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD for (i = 0; i < MAX_USERS; i++) { char tmp[64] = {0}; diff --git a/cores/internal_cores.h b/cores/internal_cores.h index 82f9aa59e5..d30b8d17b2 100644 --- a/cores/internal_cores.h +++ b/cores/internal_cores.h @@ -184,7 +184,7 @@ size_t libretro_imageviewer_retro_get_memory_size(unsigned id); #endif -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) /* Internal networked retropad core. */ void libretro_netretropad_retro_init(void); diff --git a/dynamic.c b/dynamic.c index c5e5cac8e1..401cfce17c 100644 --- a/dynamic.c +++ b/dynamic.c @@ -77,7 +77,7 @@ static dylib_t lib_handle; #define SYMBOL_IMAGEVIEWER(x) current_core->x = libretro_imageviewer_##x #endif -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) #define SYMBOL_NETRETROPAD(x) current_core->x = libretro_netretropad_##x #endif @@ -507,7 +507,7 @@ static void load_symbols(enum rarch_core_type type, struct retro_core_t *current #endif break; case CORE_TYPE_NETRETROPAD: -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) SYMBOL_NETRETROPAD(retro_init); SYMBOL_NETRETROPAD(retro_deinit); diff --git a/griffin/griffin.c b/griffin/griffin.c index 603a6c7260..92e4380361 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -934,7 +934,7 @@ MENU #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD #include "../input/input_remote.c" #include "../cores/libretro-net-retropad/net_retropad_core.c" #endif diff --git a/input/input_driver.c b/input/input_driver.c index 60f89d51c2..cb0aba6d9b 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -27,7 +27,7 @@ #include "../verbosity.h" #include "../command.h" -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD #include "input_remote.h" #endif @@ -95,7 +95,7 @@ static turbo_buttons_t input_driver_turbo_btns; #ifdef HAVE_COMMAND static command_t *input_driver_command = NULL; #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD static input_remote_t *input_driver_remote = NULL; #endif static const input_driver_t *current_input = NULL; @@ -281,7 +281,7 @@ static retro_input_t input_driver_keys_pressed(void) } #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD if (input_driver_remote) state |= input_remote_key_pressed(key,0); #endif @@ -436,7 +436,7 @@ void input_poll(void) command_poll(input_driver_command); #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD if (input_driver_remote) input_remote_poll(input_driver_remote); #endif @@ -486,7 +486,7 @@ int16_t input_state(unsigned port, unsigned device, input_state_overlay(&res, port, device, idx, id); #endif -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD input_remote_state(&res, port, device, idx, id); #endif } @@ -877,7 +877,7 @@ void input_driver_deinit_command(void) void input_driver_deinit_remote(void) { -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD if (input_driver_remote) input_remote_free(input_driver_remote); input_driver_remote = NULL; @@ -886,7 +886,7 @@ void input_driver_deinit_remote(void) bool input_driver_init_remote(void) { -#ifdef HAVE_NETWORK_GAMEPAD +#ifdef HAVE_NETWORKGAMEPAD settings_t *settings = config_get_ptr(); if (!settings->network_remote_enable) diff --git a/input/input_remote.c b/input/input_remote.c index 2f20c0d8db..a04cf01a33 100644 --- a/input/input_remote.c +++ b/input/input_remote.c @@ -41,7 +41,7 @@ struct input_remote { -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) int net_fd[MAX_USERS]; #endif @@ -63,7 +63,7 @@ static input_remote_state_t *input_remote_get_state_ptr(void) return &remote_st_ptr; } -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) static bool input_remote_init_network(input_remote_t *handle, uint16_t port, unsigned user) { @@ -107,7 +107,7 @@ error: input_remote_t *input_remote_new(uint16_t port) { unsigned user; -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) settings_t *settings = config_get_ptr(); #endif input_remote_t *handle = (input_remote_t*) @@ -118,7 +118,7 @@ input_remote_t *input_remote_new(uint16_t port) (void)port; -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) for(user = 0; user < settings->input.max_users; user ++) { handle->net_fd[user] = -1; @@ -130,7 +130,7 @@ input_remote_t *input_remote_new(uint16_t port) return handle; -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) error: input_remote_free(handle); return NULL; @@ -140,7 +140,7 @@ error: void input_remote_free(input_remote_t *handle) { unsigned user; -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) settings_t *settings = config_get_ptr(); for(user = 0; user < settings->input.max_users; user ++) @@ -150,7 +150,7 @@ void input_remote_free(input_remote_t *handle) free(handle); } -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) static void input_remote_parse_packet(char *buffer, unsigned size, unsigned user) { input_remote_state_t *ol_state = input_remote_get_state_ptr(); @@ -212,7 +212,7 @@ void input_remote_poll(input_remote_t *handle) { if (settings->network_remote_enable_user[user]) { -#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY) +#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY) char buf[8]; ssize_t ret; fd_set fds; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index fd7a3f4422..a3e3dd5dea 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3575,7 +3575,7 @@ static bool setting_append_list( &subgroup_info, parent_group); -#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD) +#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) CONFIG_ACTION( list, list_info, menu_hash_to_str(MENU_LABEL_START_NET_RETROPAD), diff --git a/qb/config.libs.sh b/qb/config.libs.sh index a5093b5c4e..e693821d48 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -161,14 +161,14 @@ if [ "$HAVE_NETWORKING" = 'yes' ]; then fi fi HAVE_NETWORK_CMD=yes - HAVE_NETWORK_GAMEPAD=yes + HAVE_NETWORKGAMEPAD=yes [ "$HAVE_NETPLAY" != 'no' ] && HAVE_NETPLAY='yes' else echo "Warning: All networking features have been disabled." HAVE_NETWORK_CMD='no' HAVE_NETPLAY='no' - HAVE_NETWORK_GAMEPAD='no' + HAVE_NETWORKGAMEPAD='no' fi check_lib STDIN_CMD "$CLIB" fcntl diff --git a/qb/config.params.sh b/qb/config.params.sh index c07d3205de..c197aef6d9 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -21,6 +21,8 @@ C89_FFMPEG=no HAVE_SSA=auto # SSA/ASS for FFmpeg subtitle support HAVE_DYLIB=auto # Dynamic loading support HAVE_NETWORKING=auto # Networking features (recommended) +HAVE_NETWORKGAMEPAD=auto # Networked game pad (plus baked-in core) +C89_NETWORKGAMEPAD=no HAVE_NETPLAY=auto # Netplay support (requires networking) HAVE_D3D9=yes # Direct3D 9 support HAVE_OPENGL=auto # OpenGL support diff --git a/tasks/task_content.c b/tasks/task_content.c index 66d8b5366c..7ffe33ef43 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -1713,7 +1713,7 @@ bool task_push_content_load_default( /* First we determine if we are loading from a menu */ switch (mode) { -#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD) +#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: #endif case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: @@ -1845,7 +1845,7 @@ bool task_push_content_load_default( runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL); runloop_ctl(RUNLOOP_CTL_TASK_INIT, NULL); break; -#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD) +#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: retroarch_set_current_core_type(CORE_TYPE_NETRETROPAD, true); break; @@ -1859,7 +1859,7 @@ bool task_push_content_load_default( { case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE: case CONTENT_MODE_LOAD_FROM_CLI: -#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD) +#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: #endif case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: @@ -1894,7 +1894,7 @@ bool task_push_content_load_default( switch (mode) { case CONTENT_MODE_LOAD_CONTENT_FROM_PLAYLIST_FROM_MENU: -#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD) +#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: #endif break;