/* One press, one command. * * Links the shipping RetroArch objects with only main() replaced (the * playlist_nav pattern) and boots the menu on the null video driver, * whose init is swapped for one that counts. Rows whose command * reinitialises the video driver are then pressed through * menu_action_handle_setting(), as the menu presses them. * * The claim: a press reinitialises the driver once - the first press * and every later one, with OK, right, left and Start, on a row that * applies its command by itself (SD_FLAG_CMD_APPLY_AUTO) and on one * that does not. The row's handler and the dispatcher both run the * change handler; when each of them fires the command, the driver * comes up twice for one press. * * And Start on the overlay preset rows restores what a fresh * configuration has - the bundled preset on mobile, none elsewhere - * not the directory their file browser opens in. * * Requires a completed non-Qt build: * * ./configure --disable-qt && make * samples/menu/setting_command/build.sh */ #include #include #include #include #include #include