Skip to content

Commit

Permalink
esthemes: add ability to patche themes locally
Browse files Browse the repository at this point in the history
Added the ability to patch themes locally to fix layout bugs surfaced after EmulationStation's fixes for positioning added a while ago.
Mostly done to fix @ruckage's themes, which haven't been updated in a long time.

Fixes included:

 * for the 'snes-mini' theme, based on ruckage/es-theme-snes-mini#26, submitted by @makofee
 * for the 'nes-mini' theme, based on https://github.com/ruckage/es-theme-nes-mini/pulls, submittedf by @grosa1, which in turn is based on https://retropie.org.uk/forum/topic/12583/snes-mini-theme/929?_=1699852993853 (?)
 * for the 'famicom-mini' theme, adapted from the previous patch
  • Loading branch information
cmitu committed Nov 13, 2023
1 parent 729aa72 commit 3873749
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scriptmodules/supplementary/esthemes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ function install_theme_esthemes() {

mkdir -p "/etc/emulationstation/themes"
gitPullOrClone "/etc/emulationstation/themes/$name" "https://github.com/$repo/es-theme-$theme.git" "$branch"

# apply any patches for themes broken due to ES fixes
if [[ "$pixel_pos" == 1 ]] && [ -f "$md_data/patch-$repo-$theme.diff" ]; then
pushd "/etc/emulationstation/themes/$name"
applyPatch "$md_data/patch-$repo-$theme.diff"
popd
fi
}

function uninstall_theme_esthemes() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/famicom-mini.xml b/famicom-mini.xml
index d67215c..ee12a78 100644
--- a/famicom-mini.xml
+++ b/famicom-mini.xml
@@ -139,6 +139,8 @@ author: ruckage
<fontPath>./art/NESCyrillic_gamelist.ttf</fontPath>
<alignment>left</alignment>
<fontSize>0.0592592592592593</fontSize>
+ <pos>0.2959 0.2035</pos>
+ <size>0.4085 0.6</size>
</textlist>

<text name="logoText">
13 changes: 13 additions & 0 deletions scriptmodules/supplementary/esthemes/patch-ruckage-nes-mini.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/nesmini.xml b/nesmini.xml
index 149ffae..20d0d06 100644
--- a/nesmini.xml
+++ b/nesmini.xml
@@ -150,6 +150,8 @@ author: ruckage
<fontPath>./art/NESCyrillic_gamelist.ttf</fontPath>
<alignment>left</alignment>
<horizontalMargin>0.0083333333333333</horizontalMargin>
+ <pos>0.2959 0.2035</pos>
+ <size>0.4085 0.6</size>
<fontSize>0.0592592592592593</fontSize>
</textlist>

144 changes: 144 additions & 0 deletions scriptmodules/supplementary/esthemes/patch-ruckage-snes-mini.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
diff --git a/layouts/1024x768.xml b/layouts/1024x768.xml
index 0fa2e6d..2b29a33 100644
--- a/layouts/1024x768.xml
+++ b/layouts/1024x768.xml
@@ -10,12 +10,12 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <size>0.5611111111111111 0.5481481481481481</size>
- <pos>0.9861111111111111 0.2259259259259259</pos>
+ <size>0.5615234375 0.630208333333333</size>
+ <pos>0.986328125 0.1953125</pos>
<lineSpacing>1.39</lineSpacing>
<origin>1 0</origin>
- <selectorHeight>0.0814814814814815</selectorHeight>
- <selectorOffsetY>-0.0111111111111111</selectorOffsetY>
+ <selectorHeight>0.08203125</selectorHeight>
+ <selectorOffsetY>-0.01171875</selectorOffsetY>
</textlist>

</view>
diff --git a/layouts/1280x720.xml b/layouts/1280x720.xml
index f7fae91..0ad84f2 100644
--- a/layouts/1280x720.xml
+++ b/layouts/1280x720.xml
@@ -8,10 +8,10 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <pos>${listx} 0.2259259259259259</pos>
- <size>${listWidth} 0.5481481481481481</size>
+ <pos>${listx} 0.195833333333333</pos>
+ <size>${listWidth} 0.629166666666667</size>
<lineSpacing>1.395</lineSpacing>
- <selectorHeight>0.0814814814814815</selectorHeight>
+ <selectorHeight>0.081944444444444</selectorHeight>
<selectorOffsetY>-0.0111111111111111</selectorOffsetY>
</textlist>

diff --git a/layouts/1280x960.xml b/layouts/1280x960.xml
index acb687f..dc17453 100644
--- a/layouts/1280x960.xml
+++ b/layouts/1280x960.xml
@@ -10,12 +10,12 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <size>0.5611111111111111 0.5481481481481481</size>
- <pos>0.9861111111111111 0.2259259259259259</pos>
+ <size>0.5611111111111111 0.630208333333333</size>
+ <pos>0.9861111111111111 0.195833333333333</pos>
<lineSpacing>1.4</lineSpacing>
<origin>1 0</origin>
- <selectorHeight>0.0814814814814815</selectorHeight>
- <selectorOffsetY>-0.0111111111111111</selectorOffsetY>
+ <selectorHeight>0.08125</selectorHeight>
+ <selectorOffsetY>-0.011458333333333</selectorOffsetY>
</textlist>

</view>
diff --git a/layouts/1366x768.xml b/layouts/1366x768.xml
index 0c268c3..6131217 100644
--- a/layouts/1366x768.xml
+++ b/layouts/1366x768.xml
@@ -8,11 +8,11 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <pos>${listx} 0.2259259259259259</pos>
- <size>${listWidth} 0.5481481481481481</size>
+ <pos>${listx} 0.1953125</pos>
+ <size>${listWidth} 0.630208333333333</size>
<lineSpacing>1.39</lineSpacing>
- <selectorHeight>0.0814814814814815</selectorHeight>
- <selectorOffsetY>-0.0111111111111111</selectorOffsetY>
+ <selectorHeight>0.08203125</selectorHeight>
+ <selectorOffsetY>-0.01171875</selectorOffsetY>
</textlist>

</view>
diff --git a/layouts/1440x1080.xml b/layouts/1440x1080.xml
index 044758d..f3d6fe4 100644
--- a/layouts/1440x1080.xml
+++ b/layouts/1440x1080.xml
@@ -10,8 +10,8 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <size>0.5611111111111111 0.5481481481481481</size>
- <pos>0.9861111111111111 0.2259259259259259</pos>
+ <size>0.5611111111111111 0.62962962962963</size>
+ <pos>0.9861111111111111 0.19537037037037</pos>
<lineSpacing>1.375</lineSpacing>
<origin>1 0</origin>
<selectorHeight>0.0814814814814815</selectorHeight>
diff --git a/layouts/1920x1080.xml b/layouts/1920x1080.xml
index f4c55ef..13008ed 100644
--- a/layouts/1920x1080.xml
+++ b/layouts/1920x1080.xml
@@ -8,8 +8,8 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <pos>${listx} 0.2259259259259259</pos>
- <size>${listWidth} 0.5481481481481481</size>
+ <pos>${listx} 0.19537037037037</pos>
+ <size>${listWidth} 0.62962962962963</size>
<lineSpacing>1.375</lineSpacing>
<selectorHeight>0.0814814814814815</selectorHeight>
<selectorOffsetY>-0.0111111111111111</selectorOffsetY>
diff --git a/layouts/640x480.xml b/layouts/640x480.xml
index c58ca21..05f0a24 100644
--- a/layouts/640x480.xml
+++ b/layouts/640x480.xml
@@ -10,11 +10,11 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <size>0.5611111111111111 0.5481481481481481</size>
- <pos>0.9861111111111111 0.2259259259259259</pos>
+ <size>0.5609375 0.629166666666667</size>
+ <pos>0.9859375 0.195833333333333</pos>
<lineSpacing>1.395</lineSpacing>
<origin>1 0</origin>
- <selectorHeight>0.0814814814814815</selectorHeight>
+ <selectorHeight>0.08125</selectorHeight>
<selectorOffsetY>-0.0111111111111111</selectorOffsetY>
</textlist>

diff --git a/layouts/800x600.xml b/layouts/800x600.xml
index c58ca21..c32d8af 100644
--- a/layouts/800x600.xml
+++ b/layouts/800x600.xml
@@ -10,8 +10,8 @@ author: ruckage
<view name="basic, detailed,video">

<textlist name="gamelist">
- <size>0.5611111111111111 0.5481481481481481</size>
- <pos>0.9861111111111111 0.2259259259259259</pos>
+ <size>0.5611111111111111 0.63</size>
+ <pos>0.9861111111111111 0.195</pos>
<lineSpacing>1.395</lineSpacing>
<origin>1 0</origin>
<selectorHeight>0.0814814814814815</selectorHeight>

0 comments on commit 3873749

Please sign in to comment.