mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Meta: Prefer to use -machine pcspk-audiodev for QEMU >=5.1
This gets rid of the following warning message from QEMU on startup: qemu-system-i386: warning: '-soundhw pcspk' is deprecated, please set a backend using '-machine pcspk-audiodev=<name>' instead Fixes #4093.
This commit is contained in:
parent
46d4ef5e11
commit
b082488e94
Notes:
sideshowbarker
2024-07-18 07:32:43 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/b082488e948 Pull-request: https://github.com/SerenityOS/serenity/pull/9189 Issue: https://github.com/SerenityOS/serenity/issues/4093
1 changed files with 4 additions and 3 deletions
|
@ -82,6 +82,7 @@ fi
|
|||
|
||||
SERENITY_QEMU_MIN_REQ_VERSION=5
|
||||
installed_major_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version ([1-9][0-9]*|0).*/\1/')
|
||||
installed_minor_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version [0-9]+\.([1-9][0-9]*|0).*/\1/')
|
||||
if [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_VERSION" ]; then
|
||||
echo "Required QEMU >= 5.0! Found $($SERENITY_QEMU_BIN -version | head -n 1)"
|
||||
echo "Please install a newer version of QEMU or use the Toolchain/BuildQemu.sh script."
|
||||
|
@ -104,10 +105,10 @@ else
|
|||
SERENITY_AUDIO_BACKEND="-audiodev pa,id=snd0"
|
||||
fi
|
||||
|
||||
if [ "$installed_major_version" -gt 5 ]; then
|
||||
SERENITY_AUDIO_HW="-machine pcspk-audiodev=snd0"
|
||||
else
|
||||
if [ "$installed_major_version" -eq 5 ] && [ "$installed_minor_version" -eq 0 ]; then
|
||||
SERENITY_AUDIO_HW="-soundhw pcspk"
|
||||
else
|
||||
SERENITY_AUDIO_HW="-machine pcspk-audiodev=snd0"
|
||||
fi
|
||||
|
||||
SERENITY_SCREENS="${SERENITY_SCREENS:-1}"
|
||||
|
|
Loading…
Reference in a new issue