-
Notifications
You must be signed in to change notification settings - Fork 46
/
bezelproject.sh
executable file
·1803 lines (1742 loc) · 95.4 KB
/
bezelproject.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
#IFS=';'
# Welcome
dialog --backtitle "The Bezel Project" --title "The Bezel Project - Bezel Pack Utility" \
--yesno "\nThe Bezel Project Bezel Utility menu.\n\nThis utility will provide a downloader for Retroarach system bezel packs to be used for various systems within RetroPie.\n\nThese bezel packs will only work if the ROMs you are using are named according to the No-Intro naming convention used by EmuMovies/HyperSpin.\n\nThis utility provides a download for a bezel pack for a system and includes a PNG bezel file for every ROM for that system. The download will also include the necessary configuration files needed for Retroarch to show them. The script will also update the required retroarch.cfg files for the emulators located in the /opt/retropie/configs directory. These changes are necessary to show the PNG bezels with an opacity of 1.\n\nPeriodically, new bezel packs are completed and you will need to run the script updater to download the newest version to see these additional packs.\n\n**NOTE**\nThe MAME bezel back is inclusive for any roms located in the arcade/fba/mame-libretro rom folders.\n\n\nDo you want to proceed?" \
28 110 2>&1 > /dev/tty \
|| exit
function main_menu() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " MAIN MENU " \
--ok-label OK --cancel-label Exit \
--menu "What action would you like to perform?" 25 75 20 \
1 "Update install script - script will exit when updated" \
2 "View bezel styles available" \
3 "Download theme style bezel pack (will automatcally enable bezels)" \
4 "Download system style bezel pack (will automatcally enable bezels)" \
5 "Enable system bezel pack" \
6 "Disable system bezel pack" \
7 "Information: Retroarch cores setup for bezels per system" \
8 "Uninstall the bezel project completely" \
2>&1 > /dev/tty)
case "$choice" in
1) update_script ;;
2) view_styles ;;
3) download_bezel ;;
4) download_bezelsa ;;
5) enable_bezel ;;
6) disable_bezel ;;
7) retroarch_bezelinfo ;;
8) removebezelproject ;;
*) break ;;
esac
done
}
#########################################################
# Functions for download and enable/disable bezel packs #
#########################################################
function update_script() {
if [[ -d "/home/pigaming" ]]; then
cd "/home/pigaming/RetroPie/retropiemenu"
else
cd "/home/pi/RetroPie/retropiemenu"
fi
mv "bezelproject.sh" "bezelproject.sh.bkp"
wget "https://raw.githubusercontent.com/thebezelproject/BezelProject/master/bezelproject.sh"
chmod 777 "bezelproject.sh"
exit
}
function view_styles() {
if [[ -f "bezelproject_themestyle.png" ]]; then
local choice
while true; do
choice=$(dialog --backtitle "Bezel Project - Bezel Styles" --title " View Styles " \
--ok-label OK --cancel-label Exit \
--menu "Chose an option to see the bezel style" 25 75 20 \
1 "Theme styled bezel" \
2 "System styled bezel" \
2>&1 > /dev/tty)
case "$choice" in
1) show_themestyle ;;
2) show_sastyle ;;
*) break ;;
esac
done
else
local choice
while true; do
choice=$(dialog --backtitle "Bezel Project - Bezel Styles" --title " View Styles " \
--ok-label OK --cancel-label Exit \
--menu "Chose an option to see the bezel style" 25 75 20 \
1 "Download bezel samples" \
2>&1 > /dev/tty)
case "$choice" in
1) download_bezelsamples ;;
*) break ;;
esac
done
fi
}
function show_themestyle() {
fbi --timeout 5 --once bezelproject_themestyle.png
}
function show_sastyle() {
fbi --timeout 5 --once bezelproject_sastyle.png
}
function download_bezelsamples() {
wget "https://raw.githubusercontent.com/thebezelproject/BezelProject/master/bezelproject_themestyle.png"
wget "https://raw.githubusercontent.com/thebezelproject/BezelProject/master/bezelproject_sastyle.png"
main_menu
}
function install_bezel_pack() {
local theme="$1"
local repo="$2"
if [[ -z "$repo" ]]; then
repo="default"
fi
if [[ -z "$theme" ]]; then
theme="default"
repo="default"
fi
atheme=`echo ${theme} | sed 's/.*/\L&/'`
if [[ "${atheme}" == "mame" ]];then
mv "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha" "/opt/retropie/configs/all/retroarch/config/FB Alpha" 2> /dev/null
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus" 2> /dev/null
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)" 2> /dev/null
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010" "/opt/retropie/configs/all/retroarch/config/MAME 2010" 2> /dev/null
fi
git clone "https://github.com/$repo/bezelproject-$theme.git" "/tmp/${theme}"
cp -r "/tmp/${theme}/retroarch/" /opt/retropie/configs/all/
sudo rm -rf "/tmp/${theme}"
if [[ "${atheme}" == "mame" ]];then
show_bezel "arcade"
show_bezel "fba"
show_bezel "mame-libretro"
else
show_bezel "${atheme}"
fi
}
function uninstall_bezel_pack() {
local theme="$1"
if [[ -d "/opt/retropie/configs/all/retroarch/overlay/GameBezels/$theme" ]]; then
rm -rf "/opt/retropie/configs/all/retroarch/overlay/GameBezels/$theme"
fi
if [[ "${theme}" == "MAME" ]]; then
if [[ -d "/opt/retropie/configs/all/retroarch/overlay/ArcadeBezels" ]]; then
rm -rf "/opt/retropie/configs/all/retroarch/overlay/ArcadeBezels"
fi
fi
}
function removebezelproject() {
hide_bezel amiga
hide_bezel amstradcpc
hide_bezel arcade
hide_bezel atari2600
hide_bezel atari5200
hide_bezel atari7800
hide_bezel atari800
hide_bezel atarijaguar
hide_bezel atarilynx
hide_bezel atarist
hide_bezel atomiswave
hide_bezel c64
hide_bezel cd32
hide_bezel cdtv
hide_bezel coleco
hide_bezel dreamcast
hide_bezel famicom
hide_bezel fba
hide_bezel fds
hide_bezel gamegear
hide_bezel gb
hide_bezel gba
hide_bezel gbc
hide_bezel intellivision
hide_bezel mame-libretro
hide_bezel mastersystem
hide_bezel megadrive
hide_bezel msx
hide_bezel msx2
hide_bezel n64
hide_bezel naomi
hide_bezel nds
hide_bezel nes
hide_bezel ngp
hide_bezel ngpc
hide_bezel pce-cd
hide_bezel pcengine
hide_bezel pico
hide_bezel psx
hide_bezel saturn
hide_bezel saturn
hide_bezel sega32x
hide_bezel segacd
hide_bezel sfc
hide_bezel sg-1000
hide_bezel snes
hide_bezel supergrafx
hide_bezel tg-cd
hide_bezel tg16
hide_bezel vectrex
hide_bezel videopac
hide_bezel virtualboy
hide_bezel wonderswan
hide_bezel wonderswancolor
hide_bezel x68000
hide_bezel zx81
hide_bezel zxspectrum
rm -rf /opt/retropie/configs/all/retroarch/overlay/GameBezels
rm -rf /opt/retropie/configs/all/retroarch/overlay/ArcadeBezels
rm /home/pi/RetroPie/retropiemenu/bezelproject.sh
}
function download_bezel() {
local themes=(
'thebezelproject Amiga'
'thebezelproject AmstradCPC'
'thebezelproject Atari2600'
'thebezelproject Atari5200'
'thebezelproject Atari7800'
'thebezelproject Atari800'
'thebezelproject AtariJaguar'
'thebezelproject AtariLynx'
'thebezelproject AtariST'
'thebezelproject Atomiswave'
'thebezelproject C64'
'thebezelproject CD32'
'thebezelproject CDTV'
'thebezelproject ColecoVision'
'thebezelproject Dreamcast'
'thebezelproject FDS'
'thebezelproject Famicom'
'thebezelproject GB'
'thebezelproject GBA'
'thebezelproject GBC'
'thebezelproject GCEVectrex'
'thebezelproject GameGear'
'thebezelproject Intellivision'
'thebezelproject MAME'
'thebezelproject MSX'
'thebezelproject MSX2'
'thebezelproject MasterSystem'
'thebezelproject MegaDrive'
'thebezelproject N64'
'thebezelproject NDS'
'thebezelproject NES'
'thebezelproject NGP'
'thebezelproject NGPC'
'thebezelproject Naomi'
'thebezelproject PCE-CD'
'thebezelproject PCEngine'
'thebezelproject PSX'
'thebezelproject SFC'
'thebezelproject SG-1000'
'thebezelproject SNES'
'thebezelproject Saturn'
'thebezelproject Sega32X'
'thebezelproject SegaCD'
'thebezelproject SuperGrafx'
'thebezelproject TG-CD'
'thebezelproject TG16'
'thebezelproject Videopac'
'thebezelproject Virtualboy'
'thebezelproject X68000'
'thebezelproject ZX81'
'thebezelproject ZXSpectrum'
)
while true; do
local theme
local installed_bezelpacks=()
local repo
local options=()
local status=()
local default
local i=1
for theme in "${themes[@]}"; do
theme=($theme)
repo="${theme[0]}"
theme="${theme[1]}"
if [[ $theme == "MegaDrive" ]]; then
theme="Megadrive"
fi
if [[ -d "/opt/retropie/configs/all/retroarch/overlay/GameBezels/$theme" ]]; then
status+=("i")
options+=("$i" "Update or Uninstall $theme (installed)")
installed_bezelpacks+=("$theme $repo")
else
status+=("n")
options+=("$i" "Install $theme (not installed)")
fi
((i++))
done
local cmd=(dialog --default-item "$default" --backtitle "$__backtitle" --menu "The Bezel Project - Theme Style Downloader - Choose an option" 22 76 16)
local choice=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
default="$choice"
[[ -z "$choice" ]] && break
case "$choice" in
*) #install or update themes
theme=(${themes[choice-1]})
repo="${theme[0]}"
theme="${theme[1]}"
# if [[ "${status[choice]}" == "i" ]]; then
if [[ -d "/opt/retropie/configs/all/retroarch/overlay/GameBezels/$theme" ]]; then
options=(1 "Update $theme" 2 "Uninstall $theme")
cmd=(dialog --backtitle "$__backtitle" --menu "Choose an option for the bezel pack" 12 40 06)
local choice=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
case "$choice" in
1)
install_bezel_pack "$theme" "$repo"
;;
2)
uninstall_bezel_pack "$theme"
;;
esac
else
install_bezel_pack "$theme" "$repo"
fi
;;
esac
done
}
function install_bezel_packsa() {
local theme="$1"
local repo="$2"
if [[ -z "$repo" ]]; then
repo="default"
fi
if [[ -z "$theme" ]]; then
theme="default"
repo="default"
fi
atheme=`echo ${theme} | sed 's/.*/\L&/'`
if [[ "${atheme}" == "mame" ]];then
mv "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha" "/opt/retropie/configs/all/retroarch/config/FB Alpha" 2> /dev/null
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus" 2> /dev/null
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)" 2> /dev/null
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010" "/opt/retropie/configs/all/retroarch/config/MAME 2010" 2> /dev/null
fi
git clone "https://github.com/$repo/bezelprojectsa-$theme.git" "/tmp/${theme}"
cp -r "/tmp/${theme}/retroarch/" /opt/retropie/configs/all/
sudo rm -rf "/tmp/${theme}"
if [[ "${atheme}" == "mame" ]];then
show_bezel "arcade"
show_bezel "fba"
show_bezel "mame-libretro"
else
show_bezel "${atheme}"
fi
}
function download_bezelsa() {
local themes=(
'thebezelproject Amiga'
'thebezelproject AmstradCPC'
'thebezelproject Atari2600'
'thebezelproject Atari5200'
'thebezelproject Atari7800'
'thebezelproject Atari800'
'thebezelproject AtariJaguar'
'thebezelproject AtariLynx'
'thebezelproject AtariST'
'thebezelproject Atomiswave'
'thebezelproject C64'
'thebezelproject CD32'
'thebezelproject CDTV'
'thebezelproject ColecoVision'
'thebezelproject Dreamcast'
'thebezelproject FDS'
'thebezelproject Famicom'
'thebezelproject GB'
'thebezelproject GBA'
'thebezelproject GBC'
'thebezelproject GCEVectrex'
'thebezelproject GameGear'
'thebezelproject Intellivision'
'thebezelproject MAME'
'thebezelproject MSX'
'thebezelproject MSX2'
'thebezelproject MasterSystem'
'thebezelproject MegaDrive'
'thebezelproject N64'
'thebezelproject NDS'
'thebezelproject NES'
'thebezelproject NGP'
'thebezelproject NGPC'
'thebezelproject PCE-CD'
'thebezelproject PCEngine'
'thebezelproject PSX'
'thebezelproject Pico'
'thebezelproject SFC'
'thebezelproject SG-1000'
'thebezelproject SNES'
'thebezelproject Saturn'
'thebezelproject Sega32X'
'thebezelproject SegaCD'
'thebezelproject SuperGrafx'
'thebezelproject TG-CD'
'thebezelproject TG16'
'thebezelproject Videopac'
'thebezelproject Virtualboy'
'thebezelproject WonderSwan'
'thebezelproject WonderSwanColor'
'thebezelproject X68000'
'thebezelproject ZX81'
'thebezelproject ZXSpectrum'
)
while true; do
local theme
local installed_bezelpacks=()
local repo
local options=()
local status=()
local default
local i=1
for theme in "${themes[@]}"; do
theme=($theme)
repo="${theme[0]}"
theme="${theme[1]}"
if [[ $theme == "MegaDrive" ]]; then
theme="Megadrive"
fi
if [[ -d "/opt/retropie/configs/all/retroarch/overlay/GameBezels/$theme" ]]; then
status+=("i")
options+=("$i" "Update or Uninstall $theme (installed)")
installed_bezelpacks+=("$theme $repo")
else
status+=("n")
options+=("$i" "Install $theme (not installed)")
fi
((i++))
done
local cmd=(dialog --default-item "$default" --backtitle "$__backtitle" --menu "The Bezel Project - System Style Downloader - Choose an option" 22 76 16)
local choice=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
default="$choice"
[[ -z "$choice" ]] && break
case "$choice" in
*) #install or update themes
theme=(${themes[choice-1]})
repo="${theme[0]}"
theme="${theme[1]}"
# if [[ "${status[choice]}" == "i" ]]; then
if [[ -d "/opt/retropie/configs/all/retroarch/overlay/GameBezels/$theme" ]]; then
options=(1 "Update $theme" 2 "Uninstall $theme")
cmd=(dialog --backtitle "$__backtitle" --menu "Choose an option for the bezel pack" 12 40 06)
local choice=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
case "$choice" in
1)
install_bezel_packsa "$theme" "$repo"
;;
2)
uninstall_bezel_pack "$theme"
;;
esac
else
install_bezel_packsa "$theme" "$repo"
fi
;;
esac
done
}
function disable_bezel() {
clear
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " MAIN MENU " \
--ok-label OK --cancel-label Exit \
--menu "Which system would you like to disable bezels for?" 25 75 20 \
1 "Amiga" \
2 "AmstradCPC" \
3 "Arcade" \
4 "Atari 2600" \
5 "Atari 5200" \
6 "Atari 7800" \
7 "Atari 800" \
8 "Atari Lynx" \
9 "Atari ST" \
10 "AtariJaguar" \
11 "C64" \
12 "CD32" \
13 "CDTV" \
14 "ColecoVision" \
15 "Famicom" \
16 "Famicom Disk System" \
17 "Final Burn Alpha" \
18 "Game Boy" \
19 "Game Boy Advance" \
20 "Game Boy Color" \
21 "GameGear" \
22 "GCEVectrex" \
23 "Intellivision" \
24 "MAME Libretro" \
25 "MasterSystem" \
26 "MegaDrive" \
27 "MSX" \
28 "MSX2" \
29 "NES" \
30 "NGP" \
31 "NGPC" \
32 "Nintendo 64" \
33 "Nintendo DS" \
34 "PC Engine" \
35 "PC Engine-CD" \
36 "PSX" \
37 "Sammy Atomiswave" \
38 "Saturn" \
39 "Sega Dreamcast" \
40 "Sega Naomi" \
41 "Sega Pico" \
42 "Sega32X" \
43 "SegaCD" \
44 "SG-1000" \
45 "Sharp X68000" \
46 "SNES" \
47 "Super Famicom" \
48 "SuperGrafx" \
49 "TG16" \
50 "TG-CD" \
51 "Videopac - Odyssey 2" \
52 "Virtualboy" \
53 "WonderSwan" \
54 "WonderSwan Color" \
55 "ZX Spectrum" \
56 "ZX81" \
2>&1 > /dev/tty)
case "$choice" in
1) hide_bezel amiga ;;
2) hide_bezel amstradcpc ;;
3) hide_bezel arcade ;;
4) hide_bezel atari2600 ;;
5) hide_bezel atari5200 ;;
6) hide_bezel atari7800 ;;
7) hide_bezel atari800 ;;
8) hide_bezel atarilynx ;;
9) hide_bezel atarist ;;
10) hide_bezel atarijaguar ;;
11) hide_bezel c64 ;;
12) hide_bezel cd32 ;;
13) hide_bezel cdtv ;;
14) hide_bezel coleco ;;
15) hide_bezel famicom ;;
16) hide_bezel fds ;;
17) hide_bezel fba ;;
18) hide_bezel gb ;;
19) hide_bezel gba ;;
20) hide_bezel gbc ;;
21) hide_bezel gamegear ;;
22) hide_bezel vectrex ;;
23) hide_bezel intellivision ;;
24) hide_bezel mame-libretro ;;
25) hide_bezel mastersystem ;;
26) hide_bezel megadrive ;;
27) hide_bezel msx ;;
28) hide_bezel msx2 ;;
29) hide_bezel nes ;;
30) hide_bezel ngp ;;
31) hide_bezel ngpc ;;
32) hide_bezel n64 ;;
33) hide_bezel nds ;;
34) hide_bezel pcengine ;;
35) hide_bezel pce-cd ;;
36) hide_bezel psx ;;
37) hide_bezel atomiswave ;;
38) hide_bezel saturn ;;
39) hide_bezel dreamcast ;;
40) hide_bezel naomi ;;
41) hide_bezel pico ;;
42) hide_bezel sega32x ;;
43) hide_bezel segacd ;;
44) hide_bezel sg-1000 ;;
45) hide_bezel x68000 ;;
46) hide_bezel snes ;;
47) hide_bezel sfc ;;
48) hide_bezel supergrafx ;;
49) hide_bezel tg16 ;;
50) hide_bezel tg-cd ;;
51) hide_bezel videopac ;;
52) hide_bezel virtualboy ;;
53) hide_bezel wonderswan ;;
54) hide_bezel wonderswancolor ;;
55) hide_bezel zxspectrum ;;
56) hide_bezel zx81 ;;
*) break ;;
esac
done
}
function enable_bezel() {
clear
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " MAIN MENU " \
--ok-label OK --cancel-label Exit \
--menu "Which system would you like to enable bezels for?" 25 75 20 \
1 "Amiga" \
2 "AmstradCPC" \
3 "Arcade" \
4 "Atari 2600" \
5 "Atari 5200" \
6 "Atari 7800" \
7 "Atari 800" \
8 "Atari Lynx" \
9 "Atari ST" \
10 "AtariJaguar" \
11 "C64" \
12 "CD32" \
13 "CDTV" \
14 "ColecoVision" \
15 "Famicom" \
16 "Famicom Disk System" \
17 "Final Burn Alpha" \
18 "Game Boy" \
19 "Game Boy Advance" \
20 "Game Boy Color" \
21 "GameGear" \
22 "GCEVectrex" \
23 "Intellivision" \
24 "MAME Libretro" \
25 "MasterSystem" \
26 "MegaDrive" \
27 "MSX" \
28 "MSX2" \
29 "NES" \
30 "NGP" \
31 "NGPC" \
32 "Nintendo 64" \
33 "Nintendo DS" \
34 "PC Engine" \
35 "PC Engine-CD" \
36 "PSX" \
37 "Sammy Atomiswave" \
38 "Saturn" \
39 "Sega Dreamcast" \
40 "Sega Naomi" \
41 "Sega Pico" \
42 "Sega32X" \
43 "SegaCD" \
44 "SG-1000" \
45 "Sharp X68000" \
46 "SNES" \
47 "Super Famicom" \
48 "SuperGrafx" \
49 "TG16" \
50 "TG-CD" \
51 "Videopac - Odyssey 2" \
52 "Virtualboy" \
53 "WonderSwan" \
54 "WonderSwan Color" \
55 "ZX Spectrum" \
56 "ZX81" \
2>&1 > /dev/tty)
case "$choice" in
1) show_bezel amiga ;;
2) show_bezel amstradcpc ;;
3) show_bezel arcade ;;
4) show_bezel atari2600 ;;
5) show_bezel atari5200 ;;
6) show_bezel atari7800 ;;
7) show_bezel atari800 ;;
8) show_bezel atarilynx ;;
9) show_bezel atarist ;;
10) show_bezel atarijaguar ;;
11) show_bezel c64 ;;
12) show_bezel cd32 ;;
13) show_bezel cdtv ;;
14) show_bezel coleco ;;
15) show_bezel famicom ;;
16) show_bezel fds ;;
17) show_bezel fba ;;
18) show_bezel gb ;;
19) show_bezel gba ;;
20) show_bezel gbc ;;
21) show_bezel gamegear ;;
22) show_bezel vectrex ;;
23) show_bezel intellivision ;;
24) show_bezel mame-libretro ;;
25) show_bezel mastersystem ;;
26) show_bezel megadrive ;;
27) show_bezel msx ;;
28) show_bezel msx2 ;;
29) show_bezel nes ;;
30) show_bezel ngp ;;
31) show_bezel ngpc ;;
32) show_bezel n64 ;;
33) show_bezel nds ;;
34) show_bezel pcengine ;;
35) show_bezel pce-cd ;;
36) show_bezel psx ;;
37) show_bezel atomiswave ;;
38) show_bezel saturn ;;
39) show_bezel dreamcast ;;
40) show_bezel naomi ;;
41) show_bezel pico ;;
42) show_bezel sega32x ;;
43) show_bezel segacd ;;
44) show_bezel sg-1000 ;;
45) show_bezel x68000 ;;
46) show_bezel snes ;;
47) show_bezel sfc ;;
48) show_bezel supergrafx ;;
49) show_bezel tg16 ;;
50) show_bezel tg-cd ;;
51) show_bezel videopac ;;
52) show_bezel virtualboy ;;
53) show_bezel wonderswan ;;
54) show_bezel wonderswancolor ;;
55) show_bezel zxspectrum ;;
56) show_bezel zx81 ;;
*) break ;;
esac
done
}
function hide_bezel() {
dialog --infobox "...processing..." 3 20 ; sleep 2
emulator=$1
file="/opt/retropie/configs/${emulator}/retroarch.cfg"
case ${emulator} in
arcade)
cp /opt/retropie/configs/${emulator}/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg.bkp
cat /opt/retropie/configs/${emulator}/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/FB Alpha" "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha"
mv "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus"
mv "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)"
mv "/opt/retropie/configs/all/retroarch/config/MAME 2010" "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010"
;;
fba)
cp /opt/retropie/configs/${emulator}/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg.bkp
cat /opt/retropie/configs/${emulator}/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/FB Alpha" "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha"
;;
mame-libretro)
cp /opt/retropie/configs/${emulator}/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg.bkp
cat /opt/retropie/configs/${emulator}/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus"
mv "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)"
mv "/opt/retropie/configs/all/retroarch/config/MAME 2010" "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010"
;;
*)
cp /opt/retropie/configs/${emulator}/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg.bkp
cat /opt/retropie/configs/${emulator}/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/${emulator}/retroarch.cfg
;;
esac
}
function show_bezel() {
dialog --infobox "...processing..." 3 20 ; sleep 2
emulator=$1
file="/opt/retropie/configs/${emulator}/retroarch.cfg"
case ${emulator} in
arcade)
ifexist=`cat /opt/retropie/configs/arcade/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/arcade/retroarch.cfg /opt/retropie/configs/arcade/retroarch.cfg.bkp
cat /opt/retropie/configs/arcade/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/arcade/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/MAME-Horizontal.cfg"' /opt/retropie/configs/arcade/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/arcade/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha" "/opt/retropie/configs/all/retroarch/config/FB Alpha"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010" "/opt/retropie/configs/all/retroarch/config/MAME 2010"
else
cp /opt/retropie/configs/arcade/retroarch.cfg /opt/retropie/configs/arcade/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/MAME-Horizontal.cfg"' /opt/retropie/configs/arcade/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/arcade/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha" "/opt/retropie/configs/all/retroarch/config/FB Alpha"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010" "/opt/retropie/configs/all/retroarch/config/MAME 2010"
fi
;;
fba)
ifexist=`cat /opt/retropie/configs/fba/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/fba/retroarch.cfg /opt/retropie/configs/fba/retroarch.cfg.bkp
cat /opt/retropie/configs/fba/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/fba/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/MAME-Horizontal.cfg"' /opt/retropie/configs/fba/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/fba/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha" "/opt/retropie/configs/all/retroarch/config/FB Alpha"
else
cp /opt/retropie/configs/fba/retroarch.cfg /opt/retropie/configs/fba/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/MAME-Horizontal.cfg"' /opt/retropie/configs/fba/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/fba/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/disable_FB Alpha" "/opt/retropie/configs/all/retroarch/config/FB Alpha"
fi
;;
mame-libretro)
ifexist=`cat /opt/retropie/configs/mame-libretro/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/mame-libretro/retroarch.cfg /opt/retropie/configs/mame-libretro/retroarch.cfg.bkp
cat /opt/retropie/configs/mame-libretro/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/mame-libretro/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/MAME-Horizontal.cfg"' /opt/retropie/configs/mame-libretro/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/mame-libretro/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010" "/opt/retropie/configs/all/retroarch/config/MAME 2010"
else
cp /opt/retropie/configs/mame-libretro/retroarch.cfg /opt/retropie/configs/mame-libretro/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/MAME-Horizontal.cfg"' /opt/retropie/configs/mame-libretro/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/mame-libretro/retroarch.cfg
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003-Plus" "/opt/retropie/configs/all/retroarch/config/MAME 2003-Plus"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2003 (0.78)" "/opt/retropie/configs/all/retroarch/config/MAME 2003 (0.78)"
mv "/opt/retropie/configs/all/retroarch/config/disable_MAME 2010" "/opt/retropie/configs/all/retroarch/config/MAME 2010"
fi
;;
amiga)
ifexist=`cat /opt/retropie/configs/amiga/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/amiga/retroarch.cfg /opt/retropie/configs/amiga/retroarch.cfg.bkp
cat /opt/retropie/configs/amiga/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/amiga/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Commodore-Amiga.cfg"' /opt/retropie/configs/amiga/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/amiga/retroarch.cfg
else
cp /opt/retropie/configs/amiga/retroarch.cfg /opt/retropie/configs/amiga/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Commodore-Amiga.cfg"' /opt/retropie/configs/amiga/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/amiga/retroarch.cfg
fi
;;
atari2600)
ifexist=`cat /opt/retropie/configs/atari2600/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/atari2600/retroarch.cfg /opt/retropie/configs/atari2600/retroarch.cfg.bkp
cat /opt/retropie/configs/atari2600/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/atari2600/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-2600.cfg"' /opt/retropie/configs/atari2600/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atari2600/retroarch.cfg
else
cp /opt/retropie/configs/atari2600/retroarch.cfg /opt/retropie/configs/atari2600/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-2600.cfg"' /opt/retropie/configs/atari2600/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atari2600/retroarch.cfg
fi
;;
atari5200)
ifexist=`cat /opt/retropie/configs/atari5200/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/atari5200/retroarch.cfg /opt/retropie/configs/atari5200/retroarch.cfg.bkp
cat /opt/retropie/configs/atari5200/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/atari5200/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-5200.cfg"' /opt/retropie/configs/atari5200/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atari5200/retroarch.cfg
else
cp /opt/retropie/configs/atari5200/retroarch.cfg /opt/retropie/configs/atari5200/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-5200.cfg"' /opt/retropie/configs/atari5200/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atari5200/retroarch.cfg
fi
;;
atari7800)
ifexist=`cat /opt/retropie/configs/atari7800/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/atari7800/retroarch.cfg /opt/retropie/configs/atari7800/retroarch.cfg.bkp
cat /opt/retropie/configs/atari7800/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/atari7800/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-7800.cfg"' /opt/retropie/configs/atari7800/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atari7800/retroarch.cfg
else
cp /opt/retropie/configs/atari7800/retroarch.cfg /opt/retropie/configs/atari7800/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-7800.cfg"' /opt/retropie/configs/atari7800/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atari7800/retroarch.cfg
fi
;;
atarijaguar)
ifexist=`cat /opt/retropie/configs/atarijaguar/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/atarijaguar/retroarch.cfg /opt/retropie/configs/atarijaguar/retroarch.cfg.bkp
cat /opt/retropie/configs/atarijaguar/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/atarijaguar/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-Jaguar.cfg"' /opt/retropie/configs/atarijaguar/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atarijaguar/retroarch.cfg
else
cp /opt/retropie/configs/atarijaguar/retroarch.cfg /opt/retropie/configs/atarijaguar/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atari-Jaguar.cfg"' /opt/retropie/configs/atarijaguar/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atarijaguar/retroarch.cfg
fi
;;
atomiswave)
ifexist=`cat /opt/retropie/configs/atomiswave/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/atomiswave/retroarch.cfg /opt/retropie/configs/atomiswave/retroarch.cfg.bkp
cat /opt/retropie/configs/atomiswave/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/atomiswave/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atomiswave.cfg"' /opt/retropie/configs/atomiswave/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atomiswave/retroarch.cfg
else
cp /opt/retropie/configs/atomiswave/retroarch.cfg /opt/retropie/configs/atomiswave/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Atomiswave.cfg"' /opt/retropie/configs/atomiswave/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/atomiswave/retroarch.cfg
fi
;;
coleco)
ifexist=`cat /opt/retropie/configs/coleco/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/coleco/retroarch.cfg /opt/retropie/configs/coleco/retroarch.cfg.bkp
cat /opt/retropie/configs/coleco/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/coleco/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Colecovision.cfg"' /opt/retropie/configs/coleco/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/coleco/retroarch.cfg
else
cp /opt/retropie/configs/coleco/retroarch.cfg /opt/retropie/configs/coleco/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Colecovision.cfg"' /opt/retropie/configs/coleco/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/coleco/retroarch.cfg
fi
;;
dreamcast)
ifexist=`cat /opt/retropie/configs/dreamcast/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/dreamcast/retroarch.cfg /opt/retropie/configs/dreamcast/retroarch.cfg.bkp
cat /opt/retropie/configs/dreamcast/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/dreamcast/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Dreamcast.cfg"' /opt/retropie/configs/dreamcast/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/dreamcast/retroarch.cfg
else
cp /opt/retropie/configs/dreamcast/retroarch.cfg /opt/retropie/configs/dreamcast/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Dreamcast.cfg"' /opt/retropie/configs/dreamcast/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/dreamcast/retroarch.cfg
fi
;;
famicom)
ifexist=`cat /opt/retropie/configs/famicom/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/famicom/retroarch.cfg /opt/retropie/configs/famicom/retroarch.cfg.bkp
cat /opt/retropie/configs/famicom/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/famicom/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Nintendo-Famicom.cfg"' /opt/retropie/configs/famicom/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/famicom/retroarch.cfg
else
cp /opt/retropie/configs/famicom/retroarch.cfg /opt/retropie/configs/famicom/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Nintendo-Famicom.cfg"' /opt/retropie/configs/famicom/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/famicom/retroarch.cfg
fi
;;
fds)
ifexist=`cat /opt/retropie/configs/fds/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/fds/retroarch.cfg /opt/retropie/configs/fds/retroarch.cfg.bkp
cat /opt/retropie/configs/fds/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/fds/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Nintendo-Famicom-Disk-System.cfg"' /opt/retropie/configs/fds/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/fds/retroarch.cfg
else
cp /opt/retropie/configs/fds/retroarch.cfg /opt/retropie/configs/fds/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Nintendo-Famicom-Disk-System.cfg"' /opt/retropie/configs/fds/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/fds/retroarch.cfg
fi
;;
intellivision)
ifexist=`cat /opt/retropie/configs/intellivision/retroarch.cfg |grep "input_overlay" |wc -l`
if [[ ${ifexist} > 0 ]]
then
cp /opt/retropie/configs/intellivision/retroarch.cfg /opt/retropie/configs/intellivision/retroarch.cfg.bkp
cat /opt/retropie/configs/intellivision/retroarch.cfg |grep -v input_overlay |grep -v aspect_ratio |grep -v custom_viewport > /tmp/retroarch.cfg
cp /tmp/retroarch.cfg /opt/retropie/configs/intellivision/retroarch.cfg
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Intellivision.cfg"' /opt/retropie/configs/intellivision/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/intellivision/retroarch.cfg
else
cp /opt/retropie/configs/intellivision/retroarch.cfg /opt/retropie/configs/intellivision/retroarch.cfg.bkp
sed -i '2i input_overlay = "/opt/retropie/configs/all/retroarch/overlay/Intellivision.cfg"' /opt/retropie/configs/intellivision/retroarch.cfg
sed -i '3i input_overlay_opacity = "1.000000"' /opt/retropie/configs/intellivision/retroarch.cfg