Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2536 from GlaZedBelmont/dev
Browse files Browse the repository at this point in the history
Add getoverlays script + duplicate line fix + width/height, overlays,rotation
  • Loading branch information
fewtarius authored Dec 16, 2023
2 parents d27edf2 + de73336 commit b40877f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/jelos/sources/scripts/getoverlays
Original file line number Diff line number Diff line change
@@ -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
23 changes: 22 additions & 1 deletion packages/jelos/sources/scripts/setsettings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,11 @@ function set_aspectratio() {
done
;;
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() {
Expand Down Expand Up @@ -689,6 +694,21 @@ function set_filter() {
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() {
local REWIND="$(game_setting rewind)"
case ${REWIND} in
Expand Down Expand Up @@ -980,7 +1000,7 @@ function set_gambatte() {
echo 'gambatte_gb_palette_twb64_1 = "'${TWB1_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_twb64_2 = "'${TWB2_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
fi
Expand Down Expand Up @@ -1044,6 +1064,7 @@ set_integerscale &
set_rgascale &
set_shader &
set_filter &
set_overlay &
set_rewind &
set_savestates &
set_autosave &
Expand Down

0 comments on commit b40877f

Please sign in to comment.