diff options
author | pcm720 <pcm720@gmail.com> | 2017-02-23 17:06:10 +0300 |
---|---|---|
committer | pcm720 <pcm720@gmail.com> | 2017-02-23 17:06:10 +0300 |
commit | dc83c369ef6466a25b484bf956edf1c53b8439f3 (patch) | |
tree | 57fe118ea19809fa830e6d124f1cc9260cff8d1d | |
parent | 57564dba10b2c32dcb0df8381e8d07b8491e8e7a (diff) |
Respect custom aspect ratio setting in retroarch.cfg
-rwxr-xr-x | retroarch.hmod/bin/retroarch-clover | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/retroarch.hmod/bin/retroarch-clover b/retroarch.hmod/bin/retroarch-clover index 6d43853..6c919dc 100755 --- a/retroarch.hmod/bin/retroarch-clover +++ b/retroarch.hmod/bin/retroarch-clover @@ -41,8 +41,11 @@ rm -f /var/cache/*.state /var/cache/*.auto /var/cache/*.srm # Allow scanlines only for simple systems [ "$allow_crt" == "1" ] || crt=0 -# Set aspect ratio in config -[ -z "$ratio" ] || sed -i -e 's/aspect_ratio_index = "[^"]*"/aspect_ratio_index = "'$ratio'"/g' /etc/libretro/retroarch.cfg +# Set aspect ratio in config only if current ratio is 20 (1:1 PAR) or 21 (core provided) +current_ratio=$(cat /etc/libretro/retroarch.cfg | grep "aspect_ratio_index" | sed 's/[^0-9]*//g') +if [ -z "$ratio" ] || [ "$current_ratio" == "21" ] || [ "$current_ratio" == "20" ]; then + sed -i -e 's/aspect_ratio_index = "[^"]*"/aspect_ratio_index = "'$ratio'"/g' /etc/libretro/retroarch.cfg +fi # enable shader scanlines if need if [ "$crt" == "1" ]; then |