-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Raspberry Pi 4 with RetroPie 4.6.4
Commander Genius v2.4.5 built from source (although this issue has been here for awhile now)
If you set the game up in 1080p, quit out of the program, and then switch your resolution to 720p, the next time you launch Commander Genius you will only see a black screen due to the program trying to draw at a higher resolution than your monitor is displaying.
If we could get some command line parameters to adjust program's the screen resolution that would solve this problem pretty easy, or develop an internal solution.
Here's my workaround in the meantime:
I wrote a bash script that is automatically launched before the game that grabs the screen resolution being used and then edits the cgenius.cfg file to have the proper resolution (I only switch between 720p and 1080p, but it wouldn't be hard to adjust the regex for other resolutions).
#!/usr/bin/env bash
OUTPUT="/opt/retropie/configs/ports/cgenius/cgenius.cfg"
screen_width=$(tvservice -s | grep -m 1 -o '[0-9][0-9][0-9]\+x[0-9][0-9][0-9]\+' | grep -m 1 -o '[0-9][0-9][0-9]\+x' | grep -m 1 -o '[0-9][0-9][0-9]\+')
screen_height=$(tvservice -s | grep -m 1 -o '[0-9][0-9][0-9]\+x[0-9][0-9][0-9]\+' | grep -m 1 -o 'x[0-9][0-9][0-9]\+' | grep -m 1 -o '[0-9][0-9][0-9]\+')
if [ "$screen_height" -ge "900" ]; then
sudo sed -i 's/width = 1280/width = 1920/g' $OUTPUT
sudo sed -i 's/height = 720/height = 1080/g' $OUTPUT
else
sudo sed -i 's/width = 1920/width = 1280/g' $OUTPUT
sudo sed -i 's/height = 1080/height = 720/g' $OUTPUT
fi
Thanks for all your work :)