@mitu thanks for the codeblocks sugerence i never ear about it.
In raspberry 3 retroflag cases if you use default script if you push power button it shutdown the pi and reset button reboot it.
With this code the power button, shutdown the pi saving changes and the reset button restart only emulationstation if you are in main menu, or exit game if you are in a game.
I checked pins and are the same but i dont know why in pi4 you push the button and the pi do nothing 😟
I sent an e-mail to RetroFlag the other day describing the issue and from looking at the photo of the wires I sent, they said the colored wires were in the wrong position. They apologized then gave some directions on how to take the wires out and what the proper color order is.
I tried taking them out of the black plug but it seemed a bit of a hassle. Fortunately a replacement case arrived from Amazon today and the colored wires in the replacement case are in the correct position. I rebuilt my RetroPie and the shutdown and reset worked right away :). Thanks again for the help.
tldr: Original case wires were messed up, replacement worked.
@MisterMints Most likely something hardware, try to return it and get another.
Wish it was that simple! My Pi3 is over a year old and was a gift - I treated myself to a new 3B+ and was going to donate the broken one (obviously before it was broken!) to a retro gaming present for my little brother.
At least now he gets the same present but with a brand new 3B+ instead
@quicksilver thanks for the idea. i managed to get my kill script to work and map my hot keys with Xboxdrv to start it so now my game/ports now exit quickly. but ill remember that if i end up needing it down the road
But I've connected the Reset button on my NESPi to GPIO instead, so it can be used for something more useful. F.ex. one click = reset ROM, double click = reboot etc.
sorry all for the slight derailment, but this forum has no private message system. @DIY_glenn, im looking to do something similar with my reset button on my nespi but lost on how to hook up the gpio and how to wright a script. Many you can make a thread to explain how you did it and help us others out. I really want to learn this stuff.
I figured out the issue. Problem was I got an error when I followed MSL's instructions to the letter. First time I got an error saying something like "this can not be a service", second time it said "Failed to execute operation: Bad Message". I mistyped. The script:
never copy and paste the python script. HAND type it. its not that big and it wont take that long.
Now that you said this, I noticed on your original post that you had something like “shutdown -h now” but those quotes aren't recognized as quote by the RPi. They need to be ASCII quotes like this "shutdown -h now" so when you retyped it by hand you actually fixed these quotes!