This can be done in the retroarch configuration ingame quite easily. For a more permanent solution, try this; –

Add these lines to your retroarch.cfg under your player1 controls; –

input_enable_hotkey_btn = “X”
input_menu_toggle_btn = “X”

Change the X to whatever button number you want each button to be. For example, my enable hotkey button is “8” which is my SELECT button on my PS2 controller, and my menu_toggle_btn is “4” which corresponds to my L2 button. This means that when i hold SELECT and then press L2 at the same time, the RetroArch options menu comes up. Under the Video section, you can change your screen rotation on the fly.

Additionally, for a bit of extra functionality you can also use the line

input_exit_emulator_btn = “X”

This will allow you to hold your hotkey then press another designated button to quit your ROM and go back to the frontend.