mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Remove the redundant config for GunCon3
This commit is contained in:
parent
65455b454e
commit
d1b4d4b599
13 changed files with 40 additions and 66 deletions
|
@ -487,17 +487,6 @@ usb_handler_thread::usb_handler_thread()
|
|||
sys_usbd.notice("Adding emulated uDraw GameTablet");
|
||||
usb_devices.push_back(std::make_shared<usb_device_gametablet>(get_new_location()));
|
||||
}
|
||||
|
||||
if (g_cfg.io.guncon3 != guncon3_handler::disabled)
|
||||
{
|
||||
sys_usbd.notice("Adding emulated GunCon3 (controller 1)");
|
||||
usb_devices.push_back(std::make_shared<usb_device_guncon3>(0, get_new_location()));
|
||||
}
|
||||
if (g_cfg.io.guncon3 == guncon3_handler::two_controllers)
|
||||
{
|
||||
sys_usbd.notice("Adding emulated GunCon3 (controller 2)");
|
||||
usb_devices.push_back(std::make_shared<usb_device_guncon3>(1, get_new_location()));
|
||||
}
|
||||
}
|
||||
|
||||
usb_handler_thread::~usb_handler_thread()
|
||||
|
@ -865,6 +854,14 @@ void connect_usb_controller(u8 index, input::product_type type)
|
|||
usbh.pad_to_usb.erase(it->first);
|
||||
}
|
||||
}
|
||||
|
||||
if (!already_connected && type == input::product_type::guncon_3)
|
||||
{
|
||||
sys_usbd.success("Adding emulated GunCon3 (controller %d)", index);
|
||||
std::shared_ptr<usb_device> dev = std::make_shared<usb_device_guncon3>(index, usbh.get_new_location());
|
||||
usbh.connect_usb_device(dev);
|
||||
usbh.pad_to_usb.emplace(index, std::pair(type, dev));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ void usb_device_guncon3::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint,
|
|||
transfer->fake = true;
|
||||
transfer->expected_count = buf_size;
|
||||
transfer->expected_result = HC_CC_NOERR;
|
||||
transfer->expected_time = get_timestamp() + 500;
|
||||
transfer->expected_time = get_timestamp() + 4000;
|
||||
|
||||
if ((endpoint & 0x80) == LIBUSB_ENDPOINT_OUT)
|
||||
{
|
||||
|
|
|
@ -275,7 +275,6 @@ struct cfg_root : cfg::node
|
|||
cfg::_enum<turntable_handler> turntable{this, "Turntable emulated controller", turntable_handler::null};
|
||||
cfg::_enum<ghltar_handler> ghltar{this, "GHLtar emulated controller", ghltar_handler::null};
|
||||
cfg::_enum<gametablet_handler> gametablet{this, "GameTablet emulated controller", gametablet_handler::disabled};
|
||||
cfg::_enum<guncon3_handler> guncon3{this, "GunCon3 emulated controller", guncon3_handler::disabled};
|
||||
cfg::_enum<pad_handler_mode> pad_mode{this, "Pad handler mode", pad_handler_mode::single_threaded, true};
|
||||
cfg::_bool keep_pads_connected{this, "Keep pads connected", false, true};
|
||||
cfg::uint<0, 100'000> pad_sleep{this, "Pad handler sleep (microseconds)", 1'000, true};
|
||||
|
|
|
@ -525,22 +525,6 @@ void fmt_class_string<gametablet_handler>::format(std::string& out, u64 arg)
|
|||
});
|
||||
}
|
||||
|
||||
template <>
|
||||
void fmt_class_string<guncon3_handler>::format(std::string& out, u64 arg)
|
||||
{
|
||||
format_enum(out, arg, [](auto value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case guncon3_handler::disabled: return "Disabled";
|
||||
case guncon3_handler::one_controller: return "1 controller";
|
||||
case guncon3_handler::two_controllers: return "2 controllers";
|
||||
}
|
||||
|
||||
return unknown;
|
||||
});
|
||||
}
|
||||
|
||||
template <>
|
||||
void fmt_class_string<ppu_decoder_type>::format(std::string& out, u64 arg)
|
||||
{
|
||||
|
|
|
@ -173,13 +173,6 @@ enum class gametablet_handler
|
|||
enabled,
|
||||
};
|
||||
|
||||
enum class guncon3_handler
|
||||
{
|
||||
disabled,
|
||||
one_controller,
|
||||
two_controllers,
|
||||
};
|
||||
|
||||
enum class microphone_handler
|
||||
{
|
||||
null,
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "Emu/system_config.h"
|
||||
#include "Emu/RSX/Overlays/HomeMenu/overlay_home_menu.h"
|
||||
#include "Emu/RSX/Overlays/overlay_message.h"
|
||||
#include "Emu/Cell/lv2/sys_usbd.h"
|
||||
#include "Emu/Cell/Modules/cellGem.h"
|
||||
#include "Utilities/Thread.h"
|
||||
#include "util/atomic.hpp"
|
||||
|
|
|
@ -260,6 +260,35 @@ namespace input
|
|||
}
|
||||
}
|
||||
|
||||
inline product_type get_product_by_vid_pid(u16 vid, u16 pid)
|
||||
{
|
||||
if (vid == vendor_id::konami_de && pid == product_id::dance_dance_revolution_mat)
|
||||
return product_type::dance_dance_revolution_mat;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::dj_hero_turntable)
|
||||
return product_type::dj_hero_turntable;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::harmonix_rockband_drum_kit)
|
||||
return product_type::harmonix_rockband_drum_kit;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::harmonix_rockband_drum_kit_2)
|
||||
return product_type::harmonix_rockband_drum_kit_2;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::harmonix_rockband_guitar)
|
||||
return product_type::harmonix_rockband_guitar;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::red_octane_gh_drum_kit)
|
||||
return product_type::red_octane_gh_drum_kit;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::red_octane_gh_guitar)
|
||||
return product_type::red_octane_gh_guitar;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::rock_revolution_drum_kit)
|
||||
return product_type::rock_revolution_drum_kit;
|
||||
if (vid == vendor_id::sony_corp && pid == product_id::ps_move_navigation)
|
||||
return product_type::ps_move_navigation;
|
||||
if (vid == vendor_id::sony_cea && pid == product_id::ride_skateboard)
|
||||
return product_type::ride_skateboard;
|
||||
if (vid == vendor_id::namco && pid == product_id::guncon_3)
|
||||
return product_type::guncon_3;
|
||||
if (vid == vendor_id::sony_corp && pid == product_id::playstation_3_controller)
|
||||
return product_type::playstation_3_controller;
|
||||
return product_type::playstation_3_controller;
|
||||
}
|
||||
|
||||
inline std::vector<product_info> get_products_by_class(int class_id)
|
||||
{
|
||||
switch (class_id)
|
||||
|
|
|
@ -1095,14 +1095,6 @@ QString emu_settings::GetLocalizedSetting(const QString& original, emu_settings_
|
|||
case gametablet_handler::enabled: return tr("Enabled", "GameTablet handler");
|
||||
}
|
||||
break;
|
||||
case emu_settings_type::GunCon3:
|
||||
switch (static_cast<guncon3_handler>(index))
|
||||
{
|
||||
case guncon3_handler::disabled: return tr("Disabled", "GunCon3 handler");
|
||||
case guncon3_handler::one_controller: return tr("1 controller", "GunCon3 handler");
|
||||
case guncon3_handler::two_controllers: return tr("2 controllers", "GunCon3 handler");
|
||||
}
|
||||
break;
|
||||
case emu_settings_type::InternetStatus:
|
||||
switch (static_cast<np_internet_status>(index))
|
||||
{
|
||||
|
|
|
@ -162,7 +162,6 @@ enum class emu_settings_type
|
|||
Turntable,
|
||||
GHLtar,
|
||||
GameTablet,
|
||||
GunCon3,
|
||||
MidiDevices,
|
||||
SDLMappings,
|
||||
|
||||
|
@ -353,7 +352,6 @@ inline static const QMap<emu_settings_type, cfg_location> settings_location =
|
|||
{ emu_settings_type::Turntable, { "Input/Output", "Turntable emulated controller" }},
|
||||
{ emu_settings_type::GHLtar, { "Input/Output", "GHLtar emulated controller" }},
|
||||
{ emu_settings_type::GameTablet, { "Input/Output", "GameTablet emulated controller" }},
|
||||
{ emu_settings_type::GunCon3, { "Input/Output", "GunCon3 emulated controller" }},
|
||||
{ emu_settings_type::MidiDevices, { "Input/Output", "Emulated Midi devices" }},
|
||||
{ emu_settings_type::SDLMappings, { "Input/Output", "Load SDL GameController Mappings" }},
|
||||
|
||||
|
|
|
@ -1070,10 +1070,7 @@ void gs_frame::take_screenshot(std::vector<u8> data, u32 sshot_width, u32 sshot_
|
|||
|
||||
void gs_frame::mouseDoubleClickEvent(QMouseEvent* ev)
|
||||
{
|
||||
if (m_disable_mouse
|
||||
|| g_cfg.io.move == move_handler::mouse
|
||||
|| g_cfg.io.gametablet == gametablet_handler::enabled
|
||||
|| g_cfg.io.guncon3 != guncon3_handler::disabled) return;
|
||||
if (m_disable_mouse || g_cfg.io.move == move_handler::mouse) return;
|
||||
#ifdef HAVE_LIBEVDEV
|
||||
if (g_cfg.io.move == move_handler::gun) return;
|
||||
#endif
|
||||
|
|
|
@ -1225,9 +1225,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
|||
m_emu_settings->EnhanceComboBox(ui->gameTabletBox, emu_settings_type::GameTablet);
|
||||
SubscribeTooltip(ui->gametablet_emulated, tooltips.settings.gametablet);
|
||||
|
||||
m_emu_settings->EnhanceComboBox(ui->gunCon3Box, emu_settings_type::GunCon3);
|
||||
SubscribeTooltip(ui->guncon3_emulated, tooltips.settings.guncon3);
|
||||
|
||||
m_emu_settings->EnhanceCheckBox(ui->backgroundInputBox, emu_settings_type::BackgroundInput);
|
||||
SubscribeTooltip(ui->backgroundInputBox, tooltips.settings.background_input);
|
||||
|
||||
|
|
|
@ -1743,18 +1743,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QGroupBox" name="guncon3_emulated">
|
||||
<property name="title">
|
||||
<string>GunCon3</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="guncon3_emulated_layout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="gunCon3Box"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QGroupBox" name="gb_midi_1">
|
||||
<property name="title">
|
||||
|
|
|
@ -232,7 +232,6 @@ public:
|
|||
const QString turntable = tr("DJ Hero Turntable controller support.\nSelect 1 or 2 controllers if the game requires DJ Hero Turntable controllers and you don't have real turntable controllers.\nSelect Null if the game has support for DualShock or if you have real turntable controllers.\nA real turntable controller can be used at the same time as an emulated turntable controller.");
|
||||
const QString ghltar = tr("Guitar Hero Live (GHL) Guitar controller support.\nSelect 1 or 2 controllers if the game requires GHL Guitar controllers and you don't have real guitar controllers.\nSelect Null if the game has support for DualShock or if you have real guitar controllers.\nA real guitar controller can be used at the same time as an emulated guitar controller.");
|
||||
const QString gametablet = tr("uDraw GameTablet emulated controller support. It requires a Mouse Handler enabled.\nDisable to use a physical uDraw GameTablet device.\n• uDraw Studio: Instant Artist requires Pad1=Connected and Pad2=Null.\n• Marvel Super Hero Squad: Comic Combat requires Pad1=Null and Pad2=Connected.");
|
||||
const QString guncon3 = tr("GunCon3 emulated controller support. It requires a Mouse Handler enabled.\nDisable to use a physical GunCon3 device.");
|
||||
const QString background_input = tr("Allows pad and keyboard input while the game window is unfocused.");
|
||||
const QString show_move_cursor = tr("Shows the raw position of the PS Move input.\nThis can be very helpful during calibration screens.");
|
||||
const QString midi_devices = tr("Select up to 3 emulated MIDI devices and their types.");
|
||||
|
|
Loading…
Add table
Reference in a new issue