From b74d070c04faf5b6428652cb7d1cbebec2007708 Mon Sep 17 00:00:00 2001 From: GlaZedBelmont <48196637+GlaZedBelmont@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:11:07 -0500 Subject: [PATCH 1/5] set overscale and custom viewport settings --- packages/jelos/sources/scripts/setsettings.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/jelos/sources/scripts/setsettings.sh b/packages/jelos/sources/scripts/setsettings.sh index 05b9e9319..af378f8eb 100755 --- a/packages/jelos/sources/scripts/setsettings.sh +++ b/packages/jelos/sources/scripts/setsettings.sh @@ -637,6 +637,10 @@ 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" } function set_filtering() { @@ -645,6 +649,7 @@ function set_filtering() { function set_integerscale() { add_setting "integerscale" "video_scale_integer" + add_setting "integerscaleoverscale" "video_scale_integer_overscale" } function set_rgascale() { @@ -927,6 +932,7 @@ function set_gambatte() { local COLORIZATION=$(game_setting renderer.colorization) local TWB1_COLORIZATION=$(game_setting renderer.twb1_colorization) local TWB2_COLORIZATION=$(game_setting renderer.twb2_colorization) + local TWB3_COLORIZATION=$(game_setting renderer.twb3_colorization) local PIXELSHIFT1_COLORIZATION=$(game_setting renderer.pixelshift1_colorization) if [ -n "${COLORIZATION}" ] @@ -946,7 +952,8 @@ function set_gambatte() { echo 'gambatte_gb_internal_palette = "'${COLORIZATION}'"' >> ${GAMBATTECONF} echo 'gambatte_gb_palette_twb64_1 = "'${TWB1_COLORIZATION}'"' >> ${GAMBATTECONF} echo 'gambatte_gb_palette_twb64_2 = "'${TWB2_COLORIZATION}'"' >> ${GAMBATTECONF} - echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF} + echo 'gambatte_gb_palette_twb64_3 = "'${TWB3_COLORIZATION}'"' >> ${GAMBATTECONF} + echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF} ;; esac fi From 8ea040532d5474cf6dfb67e50909add1cca7246c Mon Sep 17 00:00:00 2001 From: GlaZedBelmont <48196637+GlaZedBelmont@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:33:47 -0500 Subject: [PATCH 2/5] Add saving for overlays and rotation --- packages/jelos/sources/scripts/setsettings.sh | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/jelos/sources/scripts/setsettings.sh b/packages/jelos/sources/scripts/setsettings.sh index 824d13f44..724a0ba6f 100755 --- a/packages/jelos/sources/scripts/setsettings.sh +++ b/packages/jelos/sources/scripts/setsettings.sh @@ -637,10 +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 "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() { @@ -693,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 @@ -953,11 +969,8 @@ 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} -<<<<<<< HEAD echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF} -======= - echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF} ->>>>>>> refs/remotes/origin/dev + echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF} ;; esac fi @@ -1021,6 +1034,7 @@ set_integerscale & set_rgascale & set_shader & set_filter & +set_overlay & set_rewind & set_savestates & set_autosave & From 586728e6ab2dbeacfe974838dd444b91a172c4c5 Mon Sep 17 00:00:00 2001 From: GlaZedBelmont <48196637+GlaZedBelmont@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:36:46 -0500 Subject: [PATCH 3/5] Re-enable width and height --- packages/jelos/sources/scripts/setsettings.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jelos/sources/scripts/setsettings.sh b/packages/jelos/sources/scripts/setsettings.sh index 724a0ba6f..aa20b0075 100755 --- a/packages/jelos/sources/scripts/setsettings.sh +++ b/packages/jelos/sources/scripts/setsettings.sh @@ -639,8 +639,8 @@ function set_aspectratio() { 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 "width" "custom_viewport_width" + add_setting "height" "custom_viewport_height" add_setting "rotation" "video_rotation" } From 2ed6f066a1beef7ba122f7a09e86b47458d87bef Mon Sep 17 00:00:00 2001 From: GlaZedBelmont <48196637+GlaZedBelmont@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:41:39 -0500 Subject: [PATCH 4/5] fix accidental duplicate line --- packages/jelos/sources/scripts/setsettings.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/jelos/sources/scripts/setsettings.sh b/packages/jelos/sources/scripts/setsettings.sh index 933cbf705..37f90d263 100755 --- a/packages/jelos/sources/scripts/setsettings.sh +++ b/packages/jelos/sources/scripts/setsettings.sh @@ -1001,7 +1001,6 @@ function set_gambatte() { 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 From de733367df86d7ab36e2abddf02e1c5bfb378ee1 Mon Sep 17 00:00:00 2001 From: GlaZedBelmont <48196637+GlaZedBelmont@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:44:03 -0500 Subject: [PATCH 5/5] fix accidental duplicate line --- packages/jelos/sources/scripts/getoverlays | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 packages/jelos/sources/scripts/getoverlays diff --git a/packages/jelos/sources/scripts/getoverlays b/packages/jelos/sources/scripts/getoverlays new file mode 100755 index 000000000..ad3813597 --- /dev/null +++ b/packages/jelos/sources/scripts/getoverlays @@ -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