From 548cc074f4a09d25a40a84f7d2be41a4b7506575 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 8 Aug 2024 05:06:28 +0200 Subject: [PATCH] input: log all config file content if used --- rpcs3/Emu/Cell/Modules/cellGem.cpp | 9 ++++- rpcs3/Emu/Cell/lv2/sys_usbd.cpp | 54 ++++++++++++++++++++--------- rpcs3/Input/basic_mouse_handler.cpp | 2 ++ rpcs3/Input/raw_mouse_handler.cpp | 2 ++ 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index 55b2feb309..9fd4ad8017 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -372,6 +372,8 @@ public: { cellGem.notice("Could not load gem config. Using defaults."); } + + cellGem.notice("Gem config=\n", g_cfg_gem.to_string()); }; SAVESTATE_INIT_POS(15); @@ -395,10 +397,15 @@ public: { save(ar); - if (!ar.is_writing() && !g_cfg_gem.load()) + if (ar.is_writing()) + return; + + if (!g_cfg_gem.load()) { cellGem.notice("Could not load gem config. Using defaults."); } + + cellGem.notice("Gem config=\n", g_cfg_gem.to_string()); } }; diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp index a47fe1b108..8e0678b510 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp @@ -423,6 +423,8 @@ usb_handler_thread::usb_handler_thread() sys_usbd.notice("Adding emulated USIO"); usb_devices.push_back(std::make_shared(get_new_location())); + + sys_usbd.notice("USIO config=\n", g_cfg_usio.to_string()); } const std::vector devices_list = fmt::split(g_cfg.io.midi_devices.to_string(), { "@@@" }); @@ -449,7 +451,10 @@ usb_handler_thread::usb_handler_thread() { sys_usbd.notice("Could not load rb3drums config. Using defaults."); } + usb_devices.push_back(std::make_shared(get_new_location(), device.name)); + + sys_usbd.notice("RB3 drums config=\n", g_cfg_rb3drums.to_string()); break; } } @@ -463,11 +468,14 @@ usb_handler_thread::usb_handler_thread() sys_usbd.notice("Adding emulated GHLtar (1 player)"); usb_devices.push_back(std::make_shared(0, get_new_location())); - } - if (g_cfg.io.ghltar == ghltar_handler::two_controllers) - { - sys_usbd.notice("Adding emulated GHLtar (2 players)"); - usb_devices.push_back(std::make_shared(1, get_new_location())); + + if (g_cfg.io.ghltar == ghltar_handler::two_controllers) + { + sys_usbd.notice("Adding emulated GHLtar (2 players)"); + usb_devices.push_back(std::make_shared(1, get_new_location())); + } + + sys_usbd.notice("Ghltar config=\n", g_cfg_ghltar.to_string()); } if (g_cfg.io.turntable == turntable_handler::one_controller || g_cfg.io.turntable == turntable_handler::two_controllers) @@ -479,11 +487,14 @@ usb_handler_thread::usb_handler_thread() sys_usbd.notice("Adding emulated turntable (1 player)"); usb_devices.push_back(std::make_shared(0, get_new_location())); - } - if (g_cfg.io.turntable == turntable_handler::two_controllers) - { - sys_usbd.notice("Adding emulated turntable (2 players)"); - usb_devices.push_back(std::make_shared(1, get_new_location())); + + if (g_cfg.io.turntable == turntable_handler::two_controllers) + { + sys_usbd.notice("Adding emulated turntable (2 players)"); + usb_devices.push_back(std::make_shared(1, get_new_location())); + } + + sys_usbd.notice("Turntable config=\n", g_cfg_turntable.to_string()); } if (g_cfg.io.buzz == buzz_handler::one_controller || g_cfg.io.buzz == buzz_handler::two_controllers) @@ -495,13 +506,16 @@ usb_handler_thread::usb_handler_thread() sys_usbd.notice("Adding emulated Buzz! buzzer (1-4 players)"); usb_devices.push_back(std::make_shared(0, 3, get_new_location())); - } - if (g_cfg.io.buzz == buzz_handler::two_controllers) - { - // The current buzz emulation piggybacks on the pad input. - // Since there can only be 7 pads connected on a PS3 the 8th player is currently not supported - sys_usbd.notice("Adding emulated Buzz! buzzer (5-7 players)"); - usb_devices.push_back(std::make_shared(4, 6, get_new_location())); + + if (g_cfg.io.buzz == buzz_handler::two_controllers) + { + // The current buzz emulation piggybacks on the pad input. + // Since there can only be 7 pads connected on a PS3 the 8th player is currently not supported + sys_usbd.notice("Adding emulated Buzz! buzzer (5-7 players)"); + usb_devices.push_back(std::make_shared(4, 6, get_new_location())); + } + + sys_usbd.notice("Buzz config=\n", g_cfg_buzz.to_string()); } } @@ -885,6 +899,8 @@ void connect_usb_controller(u8 index, input::product_type type) std::shared_ptr dev = std::make_shared(index, usbh->get_new_location()); usbh->connect_usb_device(dev, true); usbh->pad_to_usb.emplace(index, std::pair(type, dev)); + + sys_usbd.notice("GunCon3 config=\n", g_cfg_guncon3.to_string()); break; } case input::product_type::top_shot_elite: @@ -898,6 +914,8 @@ void connect_usb_controller(u8 index, input::product_type type) std::shared_ptr dev = std::make_shared(index, usbh->get_new_location()); usbh->connect_usb_device(dev, true); usbh->pad_to_usb.emplace(index, std::pair(type, dev)); + + sys_usbd.notice("Top shot elite config=\n", g_cfg_topshotelite.to_string()); break; } case input::product_type::top_shot_fearmaster: @@ -911,6 +929,8 @@ void connect_usb_controller(u8 index, input::product_type type) std::shared_ptr dev = std::make_shared(index, usbh->get_new_location()); usbh->connect_usb_device(dev, true); usbh->pad_to_usb.emplace(index, std::pair(type, dev)); + + sys_usbd.notice("Top shot fearmaster config=\n", g_cfg_topshotfearmaster.to_string()); break; } case input::product_type::udraw_gametablet: diff --git a/rpcs3/Input/basic_mouse_handler.cpp b/rpcs3/Input/basic_mouse_handler.cpp index b69983dcfe..b0440f22b9 100644 --- a/rpcs3/Input/basic_mouse_handler.cpp +++ b/rpcs3/Input/basic_mouse_handler.cpp @@ -47,6 +47,8 @@ void basic_mouse_handler::Init(const u32 max_connect) void basic_mouse_handler::reload_config() { + input_log.notice("Basic mouse config=\n%s", g_cfg_mouse.to_string()); + m_buttons[CELL_MOUSE_BUTTON_1] = get_mouse_button(g_cfg_mouse.mouse_button_1); m_buttons[CELL_MOUSE_BUTTON_2] = get_mouse_button(g_cfg_mouse.mouse_button_2); m_buttons[CELL_MOUSE_BUTTON_3] = get_mouse_button(g_cfg_mouse.mouse_button_3); diff --git a/rpcs3/Input/raw_mouse_handler.cpp b/rpcs3/Input/raw_mouse_handler.cpp index 0be5dc9e31..f69e832b33 100644 --- a/rpcs3/Input/raw_mouse_handler.cpp +++ b/rpcs3/Input/raw_mouse_handler.cpp @@ -51,6 +51,8 @@ void raw_mouse::reload_config() { if (const auto& player = ::at32(g_cfg_raw_mouse.players, m_index)) { + input_log.notice("Raw mouse config for player %d=\n%s", m_index, player->to_string()); + m_mouse_acceleration = static_cast(player->mouse_acceleration.get()) / 100.0f; m_buttons[CELL_MOUSE_BUTTON_1] = get_mouse_button(player->mouse_button_1);