File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4126,7 +4126,28 @@ static void *udev_input_init(const char *joypad_driver)
41264126 /* If using KMS and we forgot this,
41274127 * we could lock ourselves out completely. */
41284128 if (!udev -> num_devices )
4129+ {
4130+ settings_t * settings = config_get_ptr ();
41294131 RARCH_WARN ("[udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event* and /run/udev/?\n" );
4132+ /* Start screen is not used nowadays, but it still gets true value only
4133+ * on first startup without config file, so it should be good to catch
4134+ * initial boots without udev devices available. */
4135+ #if defined(__linux__ ) && !defined(ANDROID )
4136+ if (settings -> bools .menu_show_start_screen )
4137+ {
4138+ /* Force fallback to linuxraw. Driver reselection would happen even
4139+ * without overwriting input_driver setting, but that would not be saved
4140+ * as input driver auto-changes are not stored (due to interlock with
4141+ * video context driver), and on next boot user would be stuck with a
4142+ * possibly nonworking configuration.
4143+ */
4144+ strlcpy (settings -> arrays .input_driver , "linuxraw" ,
4145+ sizeof (settings -> arrays .input_driver ));
4146+ RARCH_WARN ("[udev]: First boot and without input devices, forcing fallback to linuxraw.\n" );
4147+ goto error ;
4148+ }
4149+ #endif
4150+ }
41304151
41314152 input_keymaps_init_keyboard_lut (rarch_key_map_linux );
41324153
You can’t perform that action at this time.
0 commit comments