Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tvos2
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshisuga committed Jan 30, 2019
2 parents 3aeedeb + 9091a53 commit e039472
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 41 deletions.
1 change: 1 addition & 0 deletions input/input_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ enum input_toggle_type
INPUT_TOGGLE_L3_R,
INPUT_TOGGLE_L_R,
INPUT_TOGGLE_HOLD_START,
INPUT_TOGGLE_DOWN_SELECT,
INPUT_TOGGLE_LAST
};

Expand Down
6 changes: 5 additions & 1 deletion intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MSG_HASH(
"Increase or decrease the Switch screen brightness"
)
#endif
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU Overclock"
Expand Down Expand Up @@ -8108,3 +8108,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM,
"Enable BGM sound"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DOWN_SELECT,
"Down + Select"
)
3 changes: 3 additions & 0 deletions menu/menu_setting.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,9 @@ static void setting_get_string_representation_toggle_gamepad_combo(
case INPUT_TOGGLE_HOLD_START:
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HOLD_START), len);
break;
case INPUT_TOGGLE_DOWN_SELECT:
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWN_SELECT), len);
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -2236,6 +2236,7 @@ enum msg_hash_enums
#endif

MENU_ENUM_LABEL_VALUE_HOLD_START,
MENU_ENUM_LABEL_VALUE_DOWN_SELECT,
MENU_LABEL(PLAYLIST_USE_OLD_FORMAT),
MENU_LABEL(MENU_SOUNDS),
MENU_LABEL(MENU_SOUND_OK),
Expand Down
45 changes: 12 additions & 33 deletions qb/config.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,13 @@ if [ "$OS" = 'DOS' ]; then
HAVE_LANGEXTRA=no
fi

check_lib '' THREADS "$PTHREADLIB" pthread_create
check_enabled THREADS THREAD_STORAGE 'Thread Local Storage' 'Threads are'
check_lib '' THREAD_STORAGE "$PTHREADLIB" pthread_key_create

if [ "$OS" = 'Win32' ]; then
HAVE_THREADS=yes
HAVE_THREAD_STORAGE=yes
HAVE_DYLIB=yes
else
check_lib '' THREADS "$PTHREADLIB" pthread_create

if [ "$HAVE_THREADS" = 'yes' ]; then
check_lib '' THREAD_STORAGE "$PTHREADLIB" pthread_key_create
else
HAVE_THREAD_STORAGE=no
fi

check_lib '' DYLIB "$DYLIB" dlopen
fi

Expand Down Expand Up @@ -255,14 +249,8 @@ if [ "$HAVE_SDL2" = 'yes' ] && [ "$HAVE_SDL" = 'yes' ]; then
HAVE_SDL=no
fi

check_enabled DISCORD discord

if [ "$HAVE_DISCORD" != 'no' ]; then
# Enable discord by default if it hasn't been disabled by check_enabled.
HAVE_DISCORD=yes
fi

check_enabled QT 'Qt companion'
check_enabled CXX DISCORD discord 'The C++ compiler is'
check_enabled CXX QT 'Qt companion' 'The C++ compiler is'

if [ "$HAVE_QT" != 'no' ]; then
check_pkgconf QT5CORE Qt5Core 5.2
Expand Down Expand Up @@ -325,6 +313,7 @@ if [ "$HAVE_SSL" != 'no' ]; then
fi
fi

check_enabled THREADS LIBUSB libusb 'Threads are'
check_val '' LIBUSB -lusb-1.0 libusb-1.0 libusb-1.0 1.0.13 '' false

if [ "$OS" = 'Win32' ]; then
Expand Down Expand Up @@ -385,14 +374,11 @@ fi

check_val '' MPV -lmpv '' mpv '' '' false

if [ "$HAVE_THREADS" = 'no' ] && [ "$HAVE_FFMPEG" != 'no' ]; then
HAVE_FFMPEG='no'
die : 'Notice: Threads are not available, FFmpeg will also be disabled.'
fi

check_header DRMINGW exchndl.h
check_lib '' DRMINGW -lexchndl

check_enabled THREADS FFMPEG FFmpeg 'Threads are'

if [ "$HAVE_FFMPEG" != 'no' ]; then
check_val '' AVCODEC -lavcodec '' libavcodec 54 '' false
check_val '' AVFORMAT -lavformat '' libavformat 54 '' false
Expand Down Expand Up @@ -503,7 +489,8 @@ fi
check_lib '' STRCASESTR "$CLIB" strcasestr
check_lib '' MMAP "$CLIB" mmap

check_enabled VULKAN vulkan
check_enabled CXX VULKAN vulkan 'The C++ compiler is'
check_enabled THREADS VULKAN vulkan 'Threads are'

if [ "$HAVE_VULKAN" != "no" ] && [ "$OS" = 'Win32' ]; then
HAVE_VULKAN=yes
Expand Down Expand Up @@ -550,15 +537,7 @@ if [ "$HAVE_DEBUG" = 'yes' ]; then
fi
fi

if [ "$HAVE_ZLIB" = 'no' ] && [ "$HAVE_RPNG" != 'no' ]; then
HAVE_RPNG=no
die : 'Notice: zlib is not available, RPNG will also be disabled.'
fi

if [ "$HAVE_THREADS" = 'no' ] && [ "$HAVE_LIBUSB" != 'no' ]; then
HAVE_LIBUSB=no
die : 'Notice: Threads are not available, libusb will also be disabled.'
fi
check_enabled ZLIB RPNG RPNG 'zlib is'

if [ "$HAVE_V4L2" != 'no' ] && [ "$HAVE_VIDEOPROCESSOR" != 'no' ]; then
HAVE_VIDEO_PROCESSOR=yes
Expand Down
2 changes: 1 addition & 1 deletion qb/config.params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ HAVE_CHEEVOS=yes # Retro Achievements
HAVE_NEW_CHEEVOS=no # Use rcheevos to process RetroAchievements
C89_NEW_CHEEVOS=no
HAVE_LUA=no # Lua support (for Retro Achievements)
HAVE_DISCORD=auto # Discord Integration
HAVE_DISCORD=yes # Discord Integration
C89_DISCORD=no
HAVE_SHADERPIPELINE=yes # Additional shader-based pipelines
C89_SHADERPIPELINE=no
Expand Down
19 changes: 13 additions & 6 deletions qb/qb.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,25 @@ check_compiler()
}

# check_enabled:
# $1 = HAVE_$1
# $2 = lib
# $1 = HAVE_$1 [Disabled feature]
# $2 = USER_$2 [Enabled feature]
# $3 = lib
# $4 = feature
check_enabled()
{ [ "$HAVE_CXX" != 'no' ] && return 0
tmpval="$(eval "printf %s \"\$HAVE_$1\"")"
{ tmpvar="$(eval "printf %s \"\$HAVE_$1\"")"
[ "$tmpvar" != 'no' ] && return 0
tmpval="$(eval "printf %s \"\$USER_$2\"")"

if [ "$tmpval" != 'yes' ]; then
eval "HAVE_$1=no"
setval="$(eval "printf %s \"\$HAVE_$2\"")"
if [ "$setval" != 'no' ]; then
eval "HAVE_$2=no"
die : "Notice: $4 disabled, $3 support will also be disabled."
fi
return 0
fi

die 1 "Forced to build with $2 support and the C++ compiler is disabled. Exiting ..."
die 1 "Error: $4 disabled and forced to build with $3 support."
}

# check_lib:
Expand Down
2 changes: 2 additions & 0 deletions qb/qb.params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ parse_input() # Parse stuff :V
--enable-*)
opt_exists "${1##--enable-}" "$1"
eval "HAVE_$opt=yes"
eval "USER_$opt=yes"
;;
--disable-*)
opt_exists "${1##--disable-}" "$1"
eval "HAVE_$opt=no"
eval "USER_$opt=no"
eval "HAVE_NO_$opt=yes"
;;
--with-*)
Expand Down
6 changes: 6 additions & 0 deletions retroarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -2554,6 +2554,12 @@ static bool input_driver_toggle_button_combo(
if (!BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_R))
return false;
break;
case INPUT_TOGGLE_DOWN_SELECT:
if (!BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
return false;
if (!BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_SELECT))
return false;
break;
case INPUT_TOGGLE_HOLD_START:
{
static rarch_timer_t timer = {0};
Expand Down

0 comments on commit e039472

Please sign in to comment.