Merge pull request #2536 from GlaZedBelmont/dev

Add getoverlays script + duplicate line fix + width/height, overlays,rotation
This commit is contained in:
fewtarius 2023-12-15 20:17:09 -05:00 committed by GitHub
commit b40877f095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,11 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
find /storage/overlays/ -name '*.cfg' -print0 |
while IFS= read -r -d '' line; do
echo ${line#/storage/overlays/},
done

View file

@ -637,6 +637,11 @@ function set_aspectratio() {
done done
;; ;;
esac esac
# add_setting "positionx" "custom_viewport_x"
# add_setting "positiony" "custom_viewport_y"
add_setting "width" "custom_viewport_width"
add_setting "height" "custom_viewport_height"
add_setting "rotation" "video_rotation"
} }
function set_filtering() { function set_filtering() {
@ -689,6 +694,21 @@ function set_filter() {
esac esac
} }
function set_overlay() {
local OVERLAY="$(game_setting overlayset)"
case ${OVERLAY} in
0|false|none)
add_setting "none" "input_overlay_enable" "false"
add_setting "none" "input_overlay" ""
;;
*)
local OVERLAY_PATH="/storage/overlays"
add_setting "none" "input_overlay_enable" "true"
add_setting "none" "input_overlay" "${OVERLAY_PATH}/${OVERLAY}"
;;
esac
}
function set_rewind() { function set_rewind() {
local REWIND="$(game_setting rewind)" local REWIND="$(game_setting rewind)"
case ${REWIND} in case ${REWIND} in
@ -980,7 +1000,7 @@ function set_gambatte() {
echo 'gambatte_gb_palette_twb64_1 = "'${TWB1_COLORIZATION}'"' >> ${GAMBATTECONF} echo 'gambatte_gb_palette_twb64_1 = "'${TWB1_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_twb64_2 = "'${TWB2_COLORIZATION}'"' >> ${GAMBATTECONF} echo 'gambatte_gb_palette_twb64_2 = "'${TWB2_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_twb64_3 = "'${TWB3_COLORIZATION}'"' >> ${GAMBATTECONF} echo 'gambatte_gb_palette_twb64_3 = "'${TWB3_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF} echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF}
;; ;;
esac esac
fi fi
@ -1044,6 +1064,7 @@ set_integerscale &
set_rgascale & set_rgascale &
set_shader & set_shader &
set_filter & set_filter &
set_overlay &
set_rewind & set_rewind &
set_savestates & set_savestates &
set_autosave & set_autosave &