Exclude a system from runcommand-onstart
-
I connect my Pi to a CRT TV via composite. To obtain 240p I use a simple runcommand-onstart/onend
"tvservice -c "NTSC 4:3 P" ; fbset -depth 8 ; fbset -depth 32; tvservice -s" ONSTART "tvservice -c "NTSC 4:3" ; fbset -depth 8 ; fbset -depth 32; tvservice -s" ONEND
This puts a system in the 240p mode and then brings it back to 480i for Emulationstation on quitting. It works great for all my emus, but now I would like to watch something on Kodi in 480i, without going into 240p.
Is there any way to modify this "script" so it recognises Kodi on launch and does not go into 240p mode ("NTSC 4:3 P")?
My system is RPi 3B+ 4.4 RetroPie from official image
-
@youxia The
onstart
has some parameters sent - see OnStart parameters - which you can use to determine whether you should be running the commands you're using. I'd suggest testing explicitly for the system's name and running the resolution switching commands only for the needed systems. -
@mitu Sorry, I think you misunderstood. This setup works fine as it is, because all the systems I'm interested in require 240p. All but Kodi, what with films belonging to the 480i family.
Therefore, what I'd like to happen is for runcommand-onstart to bypass Kodi somehow - or give it the "NTSC 4:3" parameter - by means of scripting magic. Since my knowledge of scripting is nil, I'm asking here. I'd imagine something along the lines of "IF $1="kodi THEN DoNothing" or "IF $1="kodi THEN tvservice -c "NTSC 4:3" ; fbset -depth 8 ; fbset -depth 32; tvservice -s"
-
So I get Kodi to start in 480i by disabling runcommand-onstart by SSH. But it's such an inelegant method.
Bumping in hope perhaps somebody knows how to write a script to exclude one system from runcommand. -
bumping this one myself as I'm trying to do the exact same thing.
i tried if, then, fi but i'm a total script noob so i'm sure my syntax is crap
trying to achieve the following
onstart
if system = "system name"
then do-a-thing
fianyone that can help?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.