Add layout diagnosis: font metrics in the log, --snapshot option
On the Steam Frame, the fixed 1200x800 QML layout overflows: about the bottom quarter is cut off and the navigation icons overlap their text. Forcing 96 DPI and switching the Quick Controls style didn't help, so the cause has to be measured rather than guessed. - SetWidget() logs the application font (family, pt, px), what 20 pt (MyText) is in px, the screen's DPI and the device pixel ratio. - --snapshot <file> writes the rendered overlay (RenderBackend::readback) as PNG at most once per second while it is visible. A time interval, because OVRAS only renders when the scene changes. Written to a temporary file and renamed, so readers never see a partial file. - run.sh passes arguments after the graphics API to the program. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,12 +67,16 @@ EOF
|
||||
|
||||
cat > "$out/run.sh" <<EOF
|
||||
#!/bin/sh
|
||||
# Restarts OVR Advanced Settings with the given graphics API, for testing:
|
||||
# ./run.sh [opengl|vulkan] (default: opengl)
|
||||
# Restarts OVR Advanced Settings with the given graphics API, for testing.
|
||||
# Further arguments go to the program:
|
||||
# ./run.sh [opengl|vulkan] [options] (default: opengl)
|
||||
# e.g. ./run.sh opengl --snapshot /tmp/ovras.png
|
||||
cd "\$(dirname "\$0")" || exit 1
|
||||
api="\${1:-opengl}"
|
||||
[ \$# -gt 0 ] && shift
|
||||
pkill -f "/$exe( |\\\$)" 2>/dev/null && sleep 1
|
||||
DISPLAY="\${DISPLAY:-:0}" nohup ./$exe --graphics-api "\${1:-opengl}" >/dev/null 2>&1 &
|
||||
echo "Started with \${1:-opengl}; log: \$(pwd)/AdvancedSettings.log"
|
||||
DISPLAY="\${DISPLAY:-:0}" nohup ./$exe --graphics-api "\$api" "\$@" >/dev/null 2>&1 &
|
||||
echo "Started with \$api; log: \$(pwd)/AdvancedSettings.log"
|
||||
EOF
|
||||
chmod +x "$out/install.sh" "$out/uninstall.sh" "$out/run.sh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user