mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	yuzu: Add ring controller test button
This commit is contained in:
		@@ -1200,7 +1200,8 @@ bool EmulatedController::IsVibrationEnabled(std::size_t device_index) {
 | 
			
		||||
    return output_devices[device_index]->IsVibrationEnabled();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool EmulatedController::SetPollingMode(Common::Input::PollingMode polling_mode) {
 | 
			
		||||
Common::Input::DriverResult EmulatedController::SetPollingMode(
 | 
			
		||||
    Common::Input::PollingMode polling_mode) {
 | 
			
		||||
    LOG_INFO(Service_HID, "Set polling mode {}", polling_mode);
 | 
			
		||||
    auto& output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)];
 | 
			
		||||
    auto& nfc_output_device = output_devices[3];
 | 
			
		||||
@@ -1208,8 +1209,11 @@ bool EmulatedController::SetPollingMode(Common::Input::PollingMode polling_mode)
 | 
			
		||||
    const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode);
 | 
			
		||||
    const auto mapped_nfc_result = output_device->SetPollingMode(polling_mode);
 | 
			
		||||
 | 
			
		||||
    return virtual_nfc_result == Common::Input::DriverResult::Success ||
 | 
			
		||||
           mapped_nfc_result == Common::Input::DriverResult::Success;
 | 
			
		||||
    if (virtual_nfc_result == Common::Input::DriverResult::Success) {
 | 
			
		||||
        return virtual_nfc_result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return mapped_nfc_result;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool EmulatedController::SetCameraFormat(
 | 
			
		||||
 
 | 
			
		||||
@@ -363,9 +363,9 @@ public:
 | 
			
		||||
    /**
 | 
			
		||||
     * Sets the desired data to be polled from a controller
 | 
			
		||||
     * @param polling_mode type of input desired buttons, gyro, nfc, ir, etc.
 | 
			
		||||
     * @return true if SetPollingMode was successfull
 | 
			
		||||
     * @return driver result from this command
 | 
			
		||||
     */
 | 
			
		||||
    bool SetPollingMode(Common::Input::PollingMode polling_mode);
 | 
			
		||||
    Common::Input::DriverResult SetPollingMode(Common::Input::PollingMode polling_mode);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Sets the desired camera format to be polled from a controller
 | 
			
		||||
 
 | 
			
		||||
@@ -130,7 +130,8 @@ Result NfcDevice::StartDetection(NFP::TagProtocol allowed_protocol) {
 | 
			
		||||
        return WrongDeviceState;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!npad_device->SetPollingMode(Common::Input::PollingMode::NFC)) {
 | 
			
		||||
    if (npad_device->SetPollingMode(Common::Input::PollingMode::NFC) !=
 | 
			
		||||
        Common::Input::DriverResult::Success) {
 | 
			
		||||
        LOG_ERROR(Service_NFC, "Nfc not supported");
 | 
			
		||||
        return NfcDisabled;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -152,7 +152,8 @@ Result NfpDevice::StartDetection(TagProtocol allowed_protocol) {
 | 
			
		||||
        return WrongDeviceState;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!npad_device->SetPollingMode(Common::Input::PollingMode::NFC)) {
 | 
			
		||||
    if (npad_device->SetPollingMode(Common::Input::PollingMode::NFC) !=
 | 
			
		||||
        Common::Input::DriverResult::Success) {
 | 
			
		||||
        LOG_ERROR(Service_NFP, "Nfc not supported");
 | 
			
		||||
        return NfcDisabled;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user