use super::*;
#[derive(Copy, Clone, Debug)]
pub enum GamepadMode {
AutoFirst,
AutoAll,
}
pub fn set_gamepad_mode(mode: GamepadMode) {
unsafe {
match mode {
GamepadMode::AutoFirst => ffi::ImGui_ImplSDL3_SetGamepadMode_AutoFirst_Rust(),
GamepadMode::AutoAll => ffi::ImGui_ImplSDL3_SetGamepadMode_AutoAll_Rust(),
}
}
}
pub fn set_gamepad_mode_for_context(imgui: &mut Context, mode: GamepadMode) {
with_context(imgui, "set_gamepad_mode_for_context()", || {
set_gamepad_mode(mode);
});
}
pub unsafe fn set_gamepad_mode_manual(gamepads: &[*mut sdl3_sys::gamepad::SDL_Gamepad]) {
unsafe {
ffi::ImGui_ImplSDL3_SetGamepadMode_Manual_Rust(gamepads.as_ptr(), gamepads.len() as i32);
}
}
pub unsafe fn set_gamepad_mode_manual_for_context(
imgui: &mut Context,
gamepads: &[*mut sdl3_sys::gamepad::SDL_Gamepad],
) {
with_context(imgui, "set_gamepad_mode_manual_for_context()", || unsafe {
set_gamepad_mode_manual(gamepads);
});
}