From e33a12c18f5283f2639d866662fd31823d9a8fb1 Mon Sep 17 00:00:00 2001 From: orbea Date: Tue, 1 May 2018 10:16:29 -0700 Subject: [PATCH 1/2] Silence -Wmisleading-indentation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gfx/video_crt_switch.c: In function ‘crt_screen_setup_aspect’: gfx/video_crt_switch.c:95:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (width < 1920) ^~ gfx/video_crt_switch.c:97:10: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ height = 480; ^~~~~~ --- gfx/video_crt_switch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 4504a1a34d..07ce0c76a6 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -93,8 +93,11 @@ static void crt_screen_setup_aspect(unsigned width, unsigned height) { /* detect menu only */ if (width < 1920) + { width = 704; height = 480; + } + crt_aspect_ratio_switch(width, height); } From b2f508d72ec35b7b5986ceac96fa22ab895a6a3d Mon Sep 17 00:00:00 2001 From: orbea Date: Tue, 1 May 2018 09:40:42 -0800 Subject: [PATCH 2/2] qb: Improve moc detection (#6680) --- qb/config.libs.sh | 2 +- qb/qb.comp.sh | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 3c0debcbb7..293ad9c814 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -270,7 +270,7 @@ check_val '' PULSE -lpulse check_val '' SDL -lSDL SDL check_val '' SDL2 -lSDL2 SDL2 -if [ "$HAVE_QT" != 'no' ]; then +if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ]; then check_pkgconf QT5CORE Qt5Core 5.2 check_pkgconf QT5GUI Qt5Gui 5.2 check_pkgconf QT5WIDGETS Qt5Widgets 5.2 diff --git a/qb/qb.comp.sh b/qb/qb.comp.sh index bf38112200..ce677e8821 100644 --- a/qb/qb.comp.sh +++ b/qb/qb.comp.sh @@ -86,14 +86,20 @@ fi if [ "$HAVE_QT" != "no" ]; then echobuf="Checking for moc" if [ -z "$MOC" ]; then - MOC="$(exists "moc")" || MOC="" - if [ -z "$MOC" ]; then - die : "$echobuf ... Not found." - else - echo "$echobuf ... $MOC" - fi - else - echo "$echobuf ... $MOC" + MOC_PATH="none" + for moc in moc-qt5 moc; do + MOC="$(exists "$moc")" || MOC="" + [ "${MOC}" ] && { + MOC_PATH="$MOC" + break + } + done + fi + + echo "$echobuf ... $MOC_PATH" + + if [ "$MOC_PATH" = "none" ]; then + die : 'Warning: moc not found, Qt companion support will be disabled.' fi fi