diff --git a/3rdparty/SoundTouch/soundtouch b/3rdparty/SoundTouch/soundtouch index 394e1f58b2..3982730833 160000 --- a/3rdparty/SoundTouch/soundtouch +++ b/3rdparty/SoundTouch/soundtouch @@ -1 +1 @@ -Subproject commit 394e1f58b23dc80599214d2e9b6a5e0dfd0bbe07 +Subproject commit 3982730833b6daefe77dcfb32b5c282851640c17 diff --git a/3rdparty/curl/curl b/3rdparty/curl/curl index 57495c6487..1c31498817 160000 --- a/3rdparty/curl/curl +++ b/3rdparty/curl/curl @@ -1 +1 @@ -Subproject commit 57495c64871d18905a0941db9196ef90bafe9a29 +Subproject commit 1c3149881769e7bd79b072e48374e4c2b3678b2f diff --git a/3rdparty/curl/libcurl.vcxproj b/3rdparty/curl/libcurl.vcxproj index 710ea9b225..6c8cd23ffb 100644 --- a/3rdparty/curl/libcurl.vcxproj +++ b/3rdparty/curl/libcurl.vcxproj @@ -76,6 +76,7 @@ + @@ -94,7 +95,9 @@ + + @@ -112,6 +115,7 @@ + @@ -138,6 +142,7 @@ + @@ -145,6 +150,7 @@ + @@ -174,10 +180,9 @@ + - - @@ -260,6 +265,7 @@ + @@ -291,6 +297,7 @@ + @@ -309,6 +316,7 @@ + @@ -328,11 +336,13 @@ + + diff --git a/3rdparty/curl/libcurl.vcxproj.filters b/3rdparty/curl/libcurl.vcxproj.filters index 3592158a28..15fe93ce39 100644 --- a/3rdparty/curl/libcurl.vcxproj.filters +++ b/3rdparty/curl/libcurl.vcxproj.filters @@ -291,12 +291,6 @@ Source Files - - Source Files - - - Source Files - Source Files @@ -522,6 +516,27 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + @@ -1055,6 +1070,21 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + diff --git a/rpcs3/Emu/Cell/Modules/cellAudioIn.h b/rpcs3/Emu/Cell/Modules/cellAudioIn.h index dc2ca6d130..7ceaa2d2bd 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudioIn.h +++ b/rpcs3/Emu/Cell/Modules/cellAudioIn.h @@ -75,7 +75,7 @@ struct CellAudioInDeviceInfo u8 reserved[12]; be_t deviceId; be_t type; - char name[64]; + char name[64]; // Not necessarily null terminated! CellAudioInSoundMode availableModes[16]; }; diff --git a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp index ed0e3d7526..32b44ccd59 100644 --- a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp @@ -38,11 +38,17 @@ void fmt_class_string::format(std::string& out, u64 arg) struct avconf_manager { shared_mutex mutex; - std::vector devices; + + struct device_info + { + CellAudioInDeviceInfo info {}; + std::string full_device_name; // The device name may be too long for CellAudioInDeviceInfo, so we additionally save the full name. + }; + std::vector devices; CellAudioInDeviceMode inDeviceMode = CELL_AUDIO_IN_SINGLE_DEVICE_MODE; // TODO: use somewhere void copy_device_info(u32 num, vm::ptr info) const; - std::optional get_device_info(vm::cptr name) const; + std::optional get_device_info(vm::cptr name) const; avconf_manager(); @@ -62,78 +68,89 @@ avconf_manager::avconf_manager() switch (g_cfg.audio.microphone_type) { case microphone_handler::standard: + { for (u32 index = 0; index < mic_list.size(); index++) { - devices.emplace_back(); - - devices[curindex].portType = CELL_AUDIO_IN_PORT_USB; - devices[curindex].availableModeCount = 1; - devices[curindex].state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; - devices[curindex].deviceId = 0xE11CC0DE + curindex; - devices[curindex].type = 0xC0DEE11C; - devices[curindex].availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; - devices[curindex].availableModes[0].channel = CELL_AUDIO_IN_CHNUM_2; - devices[curindex].availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; - devices[curindex].deviceNumber = curindex; - strcpy_trunc(devices[curindex].name, mic_list[index]); + device_info device {}; + device.info.portType = CELL_AUDIO_IN_PORT_USB; + device.info.availableModeCount = 1; + device.info.state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; + device.info.deviceId = 0xE11CC0DE + curindex; + device.info.type = 0xC0DEE11C; + device.info.availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; + device.info.availableModes[0].channel = CELL_AUDIO_IN_CHNUM_2; + device.info.availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; + device.info.deviceNumber = curindex; + device.full_device_name = mic_list[index]; + strcpy_trunc(device.info.name, device.full_device_name); + devices.push_back(std::move(device)); curindex++; } break; + } case microphone_handler::real_singstar: case microphone_handler::singstar: + { // Only one device for singstar device - devices.emplace_back(); - - devices[curindex].portType = CELL_AUDIO_IN_PORT_USB; - devices[curindex].availableModeCount = 1; - devices[curindex].state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; - devices[curindex].deviceId = 0x00000001; - devices[curindex].type = 0x14150000; - devices[curindex].availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; - devices[curindex].availableModes[0].channel = CELL_AUDIO_IN_CHNUM_2; - devices[curindex].availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; - devices[curindex].deviceNumber = curindex; - strcpy_trunc(devices[curindex].name, mic_list[0]); + device_info device {}; + device.info.portType = CELL_AUDIO_IN_PORT_USB; + device.info.availableModeCount = 1; + device.info.state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; + device.info.deviceId = 0x00000001; + device.info.type = 0x14150000; + device.info.availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; + device.info.availableModes[0].channel = CELL_AUDIO_IN_CHNUM_2; + device.info.availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; + device.info.deviceNumber = curindex; + device.full_device_name = mic_list[0]; + strcpy_trunc(device.info.name, device.full_device_name); + devices.push_back(std::move(device)); curindex++; break; + } case microphone_handler::rocksmith: - devices.emplace_back(); - - devices[curindex].portType = CELL_AUDIO_IN_PORT_USB; - devices[curindex].availableModeCount = 1; - devices[curindex].state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; - devices[curindex].deviceId = 0x12BA00FF; // Specific to rocksmith usb input - devices[curindex].type = 0xC0DE73C4; - devices[curindex].availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; - devices[curindex].availableModes[0].channel = CELL_AUDIO_IN_CHNUM_1; - devices[curindex].availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; - devices[curindex].deviceNumber = curindex; - strcpy_trunc(devices[curindex].name, mic_list[0]); + { + device_info device {}; + device.info.portType = CELL_AUDIO_IN_PORT_USB; + device.info.availableModeCount = 1; + device.info.state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; + device.info.deviceId = 0x12BA00FF; // Specific to rocksmith usb input + device.info.type = 0xC0DE73C4; + device.info.availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; + device.info.availableModes[0].channel = CELL_AUDIO_IN_CHNUM_1; + device.info.availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; + device.info.deviceNumber = curindex; + device.full_device_name = mic_list[0]; + strcpy_trunc(device.info.name, device.full_device_name); + devices.push_back(std::move(device)); curindex++; break; + } case microphone_handler::null: - default: break; + default: + break; } } if (g_cfg.io.camera != camera_handler::null) { - devices.emplace_back(); - - devices[curindex].portType = CELL_AUDIO_IN_PORT_USB; - devices[curindex].availableModeCount = 1; - devices[curindex].state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; - devices[curindex].deviceId = 0xDEADBEEF; - devices[curindex].type = 0xBEEFDEAD; - devices[curindex].availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; - devices[curindex].availableModes[0].channel = CELL_AUDIO_IN_CHNUM_NONE; - devices[curindex].availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; - devices[curindex].deviceNumber = curindex; - strcpy_trunc(devices[curindex].name, "USB Camera"); + device_info device {}; + device.info.portType = CELL_AUDIO_IN_PORT_USB; + device.info.availableModeCount = 1; + device.info.state = CELL_AUDIO_IN_DEVICE_STATE_AVAILABLE; + device.info.deviceId = 0xDEADBEEF; + device.info.type = 0xBEEFDEAD; + device.info.availableModes[0].type = CELL_AUDIO_IN_CODING_TYPE_LPCM; + device.info.availableModes[0].channel = CELL_AUDIO_IN_CHNUM_NONE; + device.info.availableModes[0].fs = CELL_AUDIO_IN_FS_8KHZ | CELL_AUDIO_IN_FS_12KHZ | CELL_AUDIO_IN_FS_16KHZ | CELL_AUDIO_IN_FS_24KHZ | CELL_AUDIO_IN_FS_32KHZ | CELL_AUDIO_IN_FS_48KHZ; + device.info.deviceNumber = curindex; + device.full_device_name = "USB Camera"; + strcpy_trunc(device.info.name, device.full_device_name); + devices.push_back(std::move(device)); curindex++; } } @@ -142,14 +159,14 @@ void avconf_manager::copy_device_info(u32 num, vm::ptr in { memset(info.get_ptr(), 0, sizeof(CellAudioInDeviceInfo)); ensure(num < devices.size()); - *info = devices[num]; + *info = devices[num].info; } -std::optional avconf_manager::get_device_info(vm::cptr name) const +std::optional avconf_manager::get_device_info(vm::cptr name) const { - for (const CellAudioInDeviceInfo& device : devices) + for (const device_info& device : devices) { - if (strncmp(device.name, name.get_ptr(), sizeof(device.name)) == 0) + if (strncmp(device.info.name, name.get_ptr(), sizeof(device.info.name)) == 0) { return device; } @@ -398,8 +415,8 @@ error_code cellAudioInRegisterDevice(u64 deviceType, vm::cptr name, vm::pt auto& av_manager = g_fxo->get(); const std::lock_guard lock(av_manager.mutex); - std::optional info = av_manager.get_device_info(name); - if (!info || !memchr(info->name, '\0', sizeof(info->name))) + std::optional device = av_manager.get_device_info(name); + if (!device) { // TODO return CELL_AUDIO_IN_ERROR_DEVICE_NOT_FOUND; @@ -407,7 +424,7 @@ error_code cellAudioInRegisterDevice(u64 deviceType, vm::cptr name, vm::pt auto& mic_thr = g_fxo->get(); const std::lock_guard mic_lock(mic_thr.mutex); - const u32 device_number = mic_thr.register_device(info->name); + const u32 device_number = mic_thr.register_device(device->full_device_name); return not_an_error(device_number); } diff --git a/rpcs3/Emu/Cell/Modules/cellMic.cpp b/rpcs3/Emu/Cell/Modules/cellMic.cpp index cb8724f965..a5ece1be59 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.cpp +++ b/rpcs3/Emu/Cell/Modules/cellMic.cpp @@ -322,6 +322,8 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co num_channels = channels; #ifndef WITHOUT_OPENAL + enumerate_devices(); + // Adjust number of channels depending on microphone type switch (device_type) { @@ -423,36 +425,40 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co break; } + ALCdevice* device = nullptr; + // Make sure we use a proper sampling rate - const auto fixup_samplingrate = [this](u32& rate) -> bool + // TODO: The used sample rate may vary for Sony's camera devices + const std::array samplingrates = { raw_samplingrate, 48000u, 32000u, 24000u, 16000u, 12000u, 8000u }; + + for (u32 samplingrate : samplingrates) { - // TODO: The used sample rate may vary for Sony's camera devices - const std::array samplingrates = { rate, 48000u, 32000u, 24000u, 16000u, 12000u, 8000u }; - - const auto test_samplingrate = [&samplingrates](const u32& rate) + if (!std::any_of(samplingrates.cbegin() + 1, samplingrates.cend(), [samplingrate](u32 r){ return r == samplingrate; })) { - // TODO: actually check if device supports sampling rates - return std::any_of(samplingrates.cbegin() + 1, samplingrates.cend(), [&rate](const u32& r){ return r == rate; }); - }; - - for (u32 samplingrate : samplingrates) - { - if (test_samplingrate(samplingrate)) - { - // Use this sampling rate - raw_samplingrate = samplingrate; - cellMic.notice("Using sampling rate %d.", samplingrate); - return true; - } - cellMic.warning("Requested sampling rate %d, but we do not support it. Trying next sampling rate...", samplingrate); + continue; } - return false; - }; + cellMic.notice("Trying sampling rate %d with %d channel(s)", samplingrate, num_channels); - if (!fixup_samplingrate(raw_samplingrate)) + device = open_device(devices[0].name, samplingrate, num_al_channels, inbuf_size); + if (!device) + { + continue; + } + + // Use this sampling rate + raw_samplingrate = samplingrate; + cellMic.notice("Using sampling rate %d and %d channel(s)", raw_samplingrate, num_channels); + break; + } + + if (!device) { + cellMic.error("Failed to open capture device '%s' (raw_samplingrate=%d, num_al_channels=0x%x, inbuf_size=%d)", devices[0].name, raw_samplingrate, num_al_channels, inbuf_size); +#ifdef _WIN32 + cellMic.error("Make sure microphone use is authorized under \"Microphone privacy settings\" in windows configuration"); +#endif return CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT; } @@ -460,29 +466,19 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co ensure(!devices.empty()); - ALCdevice* device = alcCaptureOpenDevice(devices[0].name.c_str(), raw_samplingrate, num_al_channels, inbuf_size); - - if (ALCenum err = alcGetError(device); err != ALC_NO_ERROR || !device) - { - cellMic.error("Error opening capture device %s (error=%s, device=*0x%x)", devices[0].name, fmt::alc_error{device, err}, device); -#ifdef _WIN32 - cellMic.error("Make sure microphone use is authorized under \"Microphone privacy settings\" in windows configuration"); -#endif - return CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT; - } - devices[0].device = device; devices[0].buf.resize(inbuf_size, 0); if (device_type == microphone_handler::singstar && devices.size() >= 2) { // Open a 2nd microphone into the same device - device = alcCaptureOpenDevice(devices[1].name.c_str(), raw_samplingrate, AL_FORMAT_MONO16, inbuf_size); + num_al_channels = AL_FORMAT_MONO16; + device = open_device(devices[1].name, raw_samplingrate, num_al_channels, inbuf_size); - if (ALCenum err = alcGetError(device); err != ALC_NO_ERROR || !device) + if (!device) { // Ignore it and move on - cellMic.error("Error opening 2nd SingStar capture device %s (error=%s, device=*0x%x)", devices[1].name, fmt::alc_error{device, err}, device); + cellMic.error("Failed to open 2nd SingStar capture device '%s' (raw_samplingrate=%d, num_al_channels=0x%x, inbuf_size=%d)", devices[1].name, raw_samplingrate, num_al_channels, inbuf_size); } else { @@ -517,7 +513,7 @@ error_code microphone_device::close_microphone() { if (alcCaptureCloseDevice(micdevice.device) != ALC_TRUE) { - cellMic.error("Error closing capture device %s", micdevice.name); + cellMic.error("Error closing capture device '%s'", micdevice.name); } micdevice.device = nullptr; @@ -539,7 +535,7 @@ error_code microphone_device::start_microphone() alcCaptureStart(micdevice.device); if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR) { - cellMic.error("Error starting capture of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); + cellMic.error("Error starting capture of device '%s' (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); stop_microphone(); return CELL_MICIN_ERROR_FATAL; } @@ -558,7 +554,7 @@ error_code microphone_device::stop_microphone() alcCaptureStop(micdevice.device); if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR) { - cellMic.error("Error stopping capture of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); + cellMic.error("Error stopping capture of device '%s' (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); } } #endif @@ -637,7 +633,7 @@ u32 microphone_device::capture_audio() if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR) { - cellMic.error("Error getting number of captured samples of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); + cellMic.error("Error getting number of captured samples of device '%s' (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); return CELL_MICIN_ERROR_FATAL; } @@ -655,7 +651,7 @@ u32 microphone_device::capture_audio() if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR) { - cellMic.error("Error capturing samples of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); + cellMic.error("Error capturing samples of device '%s' (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err}); } } @@ -667,6 +663,56 @@ u32 microphone_device::capture_audio() // Private functions +#ifndef WITHOUT_OPENAL +void microphone_device::enumerate_devices() +{ + cellMic.notice("Enumerating capture devices..."); + enumerated_devices.clear(); + + if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT") == AL_TRUE) + { + if (const char* alc_devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER)) + { + while (alc_devices && *alc_devices != 0) + { + cellMic.notice("Found capture device: '%s'", alc_devices); + enumerated_devices.push_back(alc_devices); + alc_devices += strlen(alc_devices) + 1; + } + } + } + else + { + // Without enumeration we can only use one device + cellMic.error("OpenAl extension ALC_ENUMERATION_EXT not supported. The enumerated capture devices will only contain the default capture device."); + + if (const char* alc_device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER)) + { + cellMic.notice("Found default capture device: '%s'", alc_device); + enumerated_devices.push_back(alc_device); + } + } +} + +ALCdevice* microphone_device::open_device(const std::string& name, u32 samplingrate, ALCenum num_al_channels, u32 buf_size) +{ + if (std::none_of(enumerated_devices.cbegin(), enumerated_devices.cend(), [&name](const std::string& dev){ return dev == name; })) + { + cellMic.error("Capture device '%s' not in enumerated devices", name); + } + + ALCdevice* device = alcCaptureOpenDevice(name.c_str(), samplingrate, num_al_channels, buf_size); + + if (ALCenum err = alcGetError(device); err != ALC_NO_ERROR || !device) + { + cellMic.warning("Failed to open capture device '%s' (error=%s, device=*0x%x, samplingrate=%d, num_al_channels=0x%x, buf_size=%d)", name, fmt::alc_error{device, err}, device, samplingrate, num_al_channels, buf_size); + device = nullptr; + } + + return device; +} +#endif + void microphone_device::get_data(const u32 num_samples) { if (num_samples == 0) diff --git a/rpcs3/Emu/Cell/Modules/cellMic.h b/rpcs3/Emu/Cell/Modules/cellMic.h index f17b954278..e4b416fa6a 100644 --- a/rpcs3/Emu/Cell/Modules/cellMic.h +++ b/rpcs3/Emu/Cell/Modules/cellMic.h @@ -326,6 +326,11 @@ private: static inline void variable_byteswap(const void* src, void* dst); inline u32 convert_16_bit_pcm_to_float(const std::vector& buffer, u32 num_bytes); +#ifndef WITHOUT_OPENAL + void enumerate_devices(); + ALCdevice* open_device(const std::string& name, u32 samplingrate, ALCenum num_al_channels, u32 buf_size); +#endif + u32 capture_audio(); void get_data(const u32 num_samples); @@ -345,6 +350,7 @@ private: std::vector buf; }; + std::vector enumerated_devices; std::vector devices; std::vector temp_buf; std::vector float_buf; @@ -376,7 +382,7 @@ public: void wake_up(); // Returns index of registered device - u32 register_device(const std::string& name); + u32 register_device(const std::string& device_name); void unregister_device(u32 dev_num); bool check_device(u32 dev_num); diff --git a/rpcs3/rpcs3qt/game_list_base.cpp b/rpcs3/rpcs3qt/game_list_base.cpp index 72b45d33bf..21640906ee 100644 --- a/rpcs3/rpcs3qt/game_list_base.cpp +++ b/rpcs3/rpcs3qt/game_list_base.cpp @@ -25,7 +25,7 @@ void game_list_base::repaint_icons(std::vector& game_data, const QCol for (game_info& game : game_data) { game->pxmap = placeholder; - + if (movie_item_base* item = game->item) { item->set_icon_load_func([this, game, device_pixel_ratio, cancel = item->icon_loading_aborted()](int) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index a294d69cc6..4399137600 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -2363,7 +2363,7 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set connect(future_watcher, &QFutureWatcher::finished, this, [=, this]() { - pdlg->setLabelText(progressLabel.arg(+*index).arg(serials_size)); + pdlg->setLabelText(progressLabel.arg(index->load()).arg(serials_size)); pdlg->setCancelButtonText(tr("OK")); QApplication::beep(); @@ -2396,7 +2396,7 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set return; } - pdlg->setLabelText(progressLabel.arg(+*index).arg(serials_size)); + pdlg->setLabelText(progressLabel.arg(index->load()).arg(serials_size)); pdlg->setCancelButtonText(tr("OK")); connect(pdlg, &progress_dialog::canceled, this, [pdlg](){ pdlg->deleteLater(); }); QApplication::beep(); diff --git a/rpcs3/rpcs3qt/microphone_creator.cpp b/rpcs3/rpcs3qt/microphone_creator.cpp index a0e63a5d51..9ea04defde 100644 --- a/rpcs3/rpcs3qt/microphone_creator.cpp +++ b/rpcs3/rpcs3qt/microphone_creator.cpp @@ -28,9 +28,9 @@ void microphone_creator::refresh_list() { if (const char* devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER)) { - while (*devices != 0) + while (devices && *devices != 0) { - cfg_log.notice("Found microphone: %s", devices); + cfg_log.notice("Found microphone: '%s'", devices); m_microphone_list.append(devices); devices += strlen(devices) + 1; } @@ -43,6 +43,7 @@ void microphone_creator::refresh_list() if (const char* device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER)) { + cfg_log.notice("Found default microphone: '%s'", device); m_microphone_list.append(device); } } diff --git a/rpcs3/rpcs3qt/ps_move_tracker_dialog.cpp b/rpcs3/rpcs3qt/ps_move_tracker_dialog.cpp index 45fbe6f59e..4b9bc5dd6e 100644 --- a/rpcs3/rpcs3qt/ps_move_tracker_dialog.cpp +++ b/rpcs3/rpcs3qt/ps_move_tracker_dialog.cpp @@ -362,7 +362,7 @@ void ps_move_tracker_dialog::update_saturation_threshold(bool update_slider) } void ps_move_tracker_dialog::update_min_radius(bool update_slider) { - ui->minRadiusGb->setTitle(tr("Min Radius: %0 %").arg(g_cfg_move.min_radius)); + ui->minRadiusGb->setTitle(tr("Min Radius: %0 %").arg(g_cfg_move.min_radius.get())); if (update_slider) { @@ -372,7 +372,7 @@ void ps_move_tracker_dialog::update_min_radius(bool update_slider) void ps_move_tracker_dialog::update_max_radius(bool update_slider) { - ui->maxRadiusGb->setTitle(tr("Max Radius: %0 %").arg(g_cfg_move.max_radius)); + ui->maxRadiusGb->setTitle(tr("Max Radius: %0 %").arg(g_cfg_move.max_radius.get())); if (update_slider) {