mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 01:25:20 +02:00
+1
-4
@@ -139,7 +139,6 @@ fn local_game_window(app: &AppWindow, config: &ui::config::Config) {
|
||||
file_dropped(app);
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn input_profiles(config: &ui::config::Config) -> Vec<String> {
|
||||
let mut profiles = vec![];
|
||||
for key in config.input.input_profiles.keys() {
|
||||
@@ -178,7 +177,6 @@ fn settings_window(app: &AppWindow, config: &ui::config::Config) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn update_input_profiles(weak: &slint::Weak<AppWindow>, config: &ui::config::Config) {
|
||||
let profiles = input_profiles(config);
|
||||
let config_bindings = config.input.input_profile_binding.clone();
|
||||
@@ -224,8 +222,8 @@ fn clear_gb_paths(weak: &slint::Weak<AppWindow>, player: i32) {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn controller_window(app: &AppWindow, config: &ui::config::Config) {
|
||||
#[cfg(not(target_os = "android"))]
|
||||
ui::sdl_init(sdl3_sys::init::SDL_INIT_GAMEPAD);
|
||||
|
||||
app.set_emulate_vru(config.input.emulate_vru);
|
||||
@@ -510,7 +508,6 @@ pub fn app_window() {
|
||||
{
|
||||
let config = ui::config::Config::new();
|
||||
settings_window(&app, &config);
|
||||
#[cfg(not(target_os = "android"))]
|
||||
controller_window(&app, &config);
|
||||
local_game_window(&app, &config);
|
||||
}
|
||||
|
||||
@@ -343,6 +343,7 @@ fn hotkey_pressed(
|
||||
pressed
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
pub fn get_controller_names() -> Vec<String> {
|
||||
let mut controllers: Vec<String> = vec![];
|
||||
|
||||
@@ -359,6 +360,11 @@ pub fn get_controller_names() -> Vec<String> {
|
||||
controllers
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn get_controller_names() -> Vec<String> {
|
||||
vec!["None".into()]
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
#[cfg(feature = "gui")]
|
||||
pub fn get_controller_paths() -> Vec<String> {
|
||||
@@ -377,6 +383,12 @@ pub fn get_controller_paths() -> Vec<String> {
|
||||
controller_paths
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(feature = "gui")]
|
||||
pub fn get_controller_paths() -> Vec<String> {
|
||||
vec![String::new()]
|
||||
}
|
||||
|
||||
fn handle_joystick_events(ui: &mut ui::Ui) {
|
||||
let joystick_event = unsafe { ui::video::get_joystick_event() };
|
||||
if joystick_event.joystick_id != 0 {
|
||||
|
||||
Reference in New Issue
Block a user