Remove xvfb and use SDL env variable instead
It turns out that xvfb and Windows don't really work together, even if it's inside of a docker.
This commit is contained in:
parent
025d617b02
commit
56788421aa
|
@ -49,8 +49,8 @@ RUN cd mgba && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||||
FROM builder AS tester
|
FROM builder AS tester
|
||||||
USER root
|
USER root
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends xvfb pulseaudio alsa-utils libsdl2-dev \
|
apt-get install -y --no-install-recommends pulseaudio alsa-utils libsdl2-dev \
|
||||||
libzip-dev libavcodec-dev libavfilter-dev x11-utils && \
|
libzip-dev libavcodec-dev libavfilter-dev && \
|
||||||
apt-get autoremove -y && apt-get clean
|
apt-get autoremove -y && apt-get clean
|
||||||
WORKDIR /opt/src
|
WORKDIR /opt/src
|
||||||
USER m2gba
|
USER m2gba
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#!/bin/pwsh
|
#!/bin/pwsh
|
||||||
|
|
||||||
"Starting Dummy services"
|
"Starting Dummy services"
|
||||||
Xvfb :1 -screen 0 1024x768x16 &
|
$Env:SDL_VIDEODRIVER = "dummy"
|
||||||
$Env:DISPLAY = ":1.0"
|
|
||||||
bash /home/m2gba/src/docker-scripts/xvfb_ready.sh
|
|
||||||
pulseaudio -D --exit-idle-time=-1
|
pulseaudio -D --exit-idle-time=-1
|
||||||
pactl load-module module-null-sink sink_name=SpeakerOutput sink_properties=device.description="Dummy_Output"
|
pactl load-module module-null-sink sink_name=SpeakerOutput sink_properties=device.description="Dummy_Output"
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Wait for Xvfb
|
|
||||||
MAX_ATTEMPTS=120 # About 60 seconds
|
|
||||||
COUNT=0
|
|
||||||
echo -n "Waiting for Xvfb to be ready..."
|
|
||||||
while ! xdpyinfo -display "${DISPLAY}" >/dev/null 2>&1; do
|
|
||||||
echo -n "."
|
|
||||||
sleep 0.50s
|
|
||||||
COUNT=$(( COUNT + 1 ))
|
|
||||||
if [ "${COUNT}" -ge "${MAX_ATTEMPTS}" ]; then
|
|
||||||
echo " Gave up waiting for X server on ${DISPLAY}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo " Done - Xvfb is ready!"
|
|
Loading…
Reference in New Issue