Homepage Forums RetroPie Project Ideas for Further Enhancements Change button in emulator launch options (runcommand)

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #105407
    colinshare84
    Participant

    Hi

    See my other post:

    Change button in emulator launch options (runcommand)

    Basically, adding an option to customise which joypad button to bring up the emulator launch options would be useful and stop any accidental presses while starting games.

    This message:

    Press a key (or joypad button 0) to configure launch options for emulator/port ($emulator). Errors will be logged to /tmp/runcommand.log

    Or even the ability to disable/hide this dialog completely for anyone who has their system set up to their liking.

    Thanks!

    #106655
    MRKane
    Participant

    There’s a joypad button for bringing up emulator launch options? I was thinking the other day that it’d be really awesome not to have to have a keyboard handy to always do this, and use the button “X” defined on setup on the controller instead :D

    #106659
    colinshare84
    Participant

    @MRKane

    Yeah if you pay attention to the quick message then you’ll see it but the problem is that if you press joypad button 0 (by accident or on purpose!) then it drops back to a menu which you can’t navigate with anything other than a keyboard! That’s why I think having the ability to change which joypad button it looks for would be a good addition.

    It may be possible to change it by editing some code but I’m unsure as to which file I would need to edit.

    #106741
    MRKane
    Participant

    You’re right on the money there – I think it’s also joypad 0 that can do that too – still, it’s only little stuff in the larger scheme of things.

    I’m only getting to grips with the project and frankly I’m afraid to mess with things as the last few times I’ve done it things have fallen over :(

    #106742
    herbfargus
    Member

    Actually in 3.0 you can navigate the runcommand menu with your dpad. Just sayin…

    But its OK to tinker- that’s what the pi is for. I’ve ruined my OS more times than I can count- just always make backups and you’ll be fine. You never learn if you don’t make mistakes :)

    #106767
    colinshare84
    Participant

    @herbfargus

    You can navigate with the d-pad?! I’m going to double check on my setup but I don’t remember that!!

    Either way, I’d still think adding an option to either disable the message or being able to change which buttons enter the runcommand menu would be a good addition. Don’t you agree? My 4 year old cousin can’t control his hands/excitement when starting a new game and I’ve had to tell him loads of times not to press buttons! Plus, I’ve got everything set up the way I want it so I don’t need to change which emulator runs a certain rom, etc.

    #106776
    petrockblog
    Keymaster

    the joy2key feature currently uses the first axis on the joypad – so dpad on some, and on others it might be an analog stick. It works on my xbox and ibuffalo controllers at least.

    #106786
    herbfargus
    Member

    In theory though if one wishes to remove the joy2key aspect (to keep kids from messing it up) while still allowing for keyboard presses could they just remove these lines?:

    https://github.com/RetroPie/RetroPie-Setup/blob/6ab98c5f76318cabacfbff76b5050e97c63624a5/scriptmodules/supplementary/runcommand/runcommand.sh#L674-L676

    #106825
    colinshare84
    Participant

    @buzz, @herbfargus

    Thanks guys, I’ve not had the chance to check if I can actually navigate using my controller. I think the reason I hadn’t noticed this before is that my player 1 controls are js1 and player 2 is js0 (long story!).


    @herbfargus
    , that’s just what I was looking for! I’ll try this and let you know.

    Thanks!

    #106834
    petrockblog
    Keymaster

    just to note the highlighted lines “stop” joy2key – you need to remove lines 655-661 to stop it from launching – but easier still you could just remove the joy2key.py program which would be simpler as it checks for it before trying to launch – /opt/retropie/supplementary/runcommand/joy2key.py

    #107039
    majerle9
    Participant

    I tried both methods listed. First I removed the lines from runcommand.sh, but nothing changed. Then I deleted joy2key.py and nothing happened then either. Now I’m not sure runcommand.sh is what runs this message. Has anyone actually tried this method and gotten it to work?

    I’m desperately trying to childproof my retropie too and this is one of a few parts of the system that leave it open to damage from kids.

    #107047
    colinshare84
    Participant

    I’ve still not had the chance to try any of this myself, luckily I only subject my machine to kids occasionally! But it’s good to know I’m not the only one, majerle9!

    Thanks for your help, buzz.

    #107081
    petrockblog
    Keymaster

    if you remove joy2key (did you remove it from the right place? Please giev more detail), there will be no joystick control to enter the launch menu nor navigate any retropie menus.

    #107261
    majerle9
    Participant

    It’s working for me now. I used both methods just to be sure.

    First I went to /opt/retropie/supplementary/runcommand/runcommand.sh and commented out all the lines that had anything to do with joy2key.

    # if joy2key.py is installed run it with cursor keys for axis, and enter + tab f$
    #__joy2key_dev=$(ls -1 /dev/input/js* 2>/dev/null | head -n1)
    #if [[ -f "$rootdir/supplementary/runcommand/joy2key.py" && -n "$__joy2key_dev" $
    #    __joy2key_dev=$(ls -1 /dev/input/js* | head -n1)
    #    "$rootdir/supplementary/runcommand/joy2key.py" "$__joy2key_dev" 1b5b44 1b5b$
    #    __joy2key_pid=$!
    #fi
    
    # check for x/m key pressed to choose a screenmode (x included as it is useful o$
    #clear
    #echo "Press a key (or joypad button 0) to configure launch options for emulator$
    #IFS= read -s -t 1 -N 1 key </dev/tty
    #if [[ -n "$key" ]]; then
    #    get_all_modes
    #    main_menu
    #    dont_launch=$?
    #    clear
    #fi
    
    #if [[ -n $__joy2key_pid ]]; then
    #    kill -INT $__joy2key_pid
    #fi
    
    #if [[ $dont_launch -eq 1 ]]; then
    #    exit 0
    #fi
    

    Then I went to /opt/retropie/supplementary/runcommand/ and deleted the joy2key.py file.

    Before I did that, when I started a game it said:

    Press a key (or joypad button 0) to configure launch options for emulator/port ($emulator). Errors will be logged to /tmp/runcommand.log

    Now it says:

    ========================================

    Thanks for all the help.

    #107312
    colinshare84
    Participant

    I feel bad for not having the time to try any of this myself!

    But thanks for all your help guys, I’ll try the steps (when life stops getting in the way!) which majerle9 took and see if I get the same result.

    Thanks again!

Viewing 15 posts - 1 through 15 (of 15 total)
  • The forum ‘Ideas for Further Enhancements’ is closed to new topics and replies.