mirror of
https://github.com/marcriera/ddgo-pnp-controller.git
synced 2025-04-18 01:29:28 +02:00
Fix D combo with MTC
This commit is contained in:
parent
8aa9a02c21
commit
bd2213f14f
5 changed files with 10 additions and 9 deletions
|
@ -1,5 +1,6 @@
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{Write};
|
use std::io::Write;
|
||||||
|
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use crate::controller::physical::ControllerState;
|
use crate::controller::physical::ControllerState;
|
||||||
use crate::controller::emulated::{DeviceDescriptor, ENDPOINT1};
|
use crate::controller::emulated::{DeviceDescriptor, ENDPOINT1};
|
||||||
|
|
|
@ -70,8 +70,8 @@ pub fn update_gadget(state: &mut ControllerState) {
|
||||||
}
|
}
|
||||||
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
||||||
if state.button_b { buttons1.insert(Buttons1::B) }
|
if state.button_b { buttons1.insert(Buttons1::B) }
|
||||||
if !state.combo && state.button_c { buttons1.insert(Buttons1::C) }
|
if state.button_c { buttons1.insert(Buttons1::C) }
|
||||||
if state.button_d { buttons1.insert(Buttons1::D) }
|
if !state.combo && state.button_d { buttons1.insert(Buttons1::D) }
|
||||||
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
||||||
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
||||||
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
||||||
|
|
|
@ -70,8 +70,8 @@ pub fn update_gadget(state: &mut ControllerState) {
|
||||||
}
|
}
|
||||||
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
||||||
if state.button_b { buttons1.insert(Buttons1::B) }
|
if state.button_b { buttons1.insert(Buttons1::B) }
|
||||||
if !state.combo && state.button_c { buttons1.insert(Buttons1::C) }
|
if state.button_c { buttons1.insert(Buttons1::C) }
|
||||||
if state.button_d { buttons1.insert(Buttons1::D) }
|
if !state.combo && state.button_d { buttons1.insert(Buttons1::D) }
|
||||||
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
||||||
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
||||||
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
||||||
|
|
|
@ -70,8 +70,8 @@ pub fn update_gadget(state: &mut ControllerState) {
|
||||||
}
|
}
|
||||||
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
||||||
if state.button_b { buttons1.insert(Buttons1::B) }
|
if state.button_b { buttons1.insert(Buttons1::B) }
|
||||||
if !state.combo && state.button_c { buttons1.insert(Buttons1::C) }
|
if state.button_c { buttons1.insert(Buttons1::C) }
|
||||||
if state.button_d { buttons1.insert(Buttons1::D) }
|
if !state.combo && state.button_d { buttons1.insert(Buttons1::D) }
|
||||||
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
||||||
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
||||||
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
||||||
|
|
|
@ -70,8 +70,8 @@ pub fn update_gadget(state: &mut ControllerState) {
|
||||||
}
|
}
|
||||||
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
if !state.combo && state.button_a { buttons1.insert(Buttons1::A) }
|
||||||
if state.button_b { buttons1.insert(Buttons1::B) }
|
if state.button_b { buttons1.insert(Buttons1::B) }
|
||||||
if !state.combo && state.button_c { buttons1.insert(Buttons1::C) }
|
if state.button_c { buttons1.insert(Buttons1::C) }
|
||||||
if state.button_d { buttons1.insert(Buttons1::D) }
|
if !state.combo && state.button_d { buttons1.insert(Buttons1::D) }
|
||||||
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
if !state.combo && state.button_up { buttons2.insert(Buttons2::UP) }
|
||||||
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
if !state.combo && state.button_down { buttons2.insert(Buttons2::DOWN) }
|
||||||
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
if !state.combo && state.button_left { buttons2.insert(Buttons2::LEFT) }
|
||||||
|
|
Loading…
Add table
Reference in a new issue