rsx/Qt: fix some undefined behavior in progress_dialog CallAfters

This commit is contained in:
Megamouse 2019-01-22 01:21:18 +01:00 committed by kd-11
parent 688d5a9919
commit 8d5d44141e
2 changed files with 4 additions and 4 deletions

View file

@ -283,7 +283,7 @@ u64 audio_ringbuffer::update()
{ {
if (!new_playing) if (!new_playing)
{ {
cellAudio.error("Audio backend stopped unexpectedly, likely due to a buffer underrun"); cellAudio.warning("Audio backend stopped unexpectedly, likely due to a buffer underrun");
flush(); flush();
playing = false; playing = false;

View file

@ -458,7 +458,7 @@ namespace rsx
{ {
ref_cnt++; ref_cnt++;
Emu.CallAfter([&]() Emu.CallAfter([&, index, processed, entry_count]()
{ {
const char *text = index == 0 ? "Loading pipeline object %u of %u" : "Compiling pipeline object %u of %u"; const char *text = index == 0 ? "Loading pipeline object %u of %u" : "Compiling pipeline object %u of %u";
dlg->ProgressBarSetMsg(index, fmt::format(text, processed, entry_count)); dlg->ProgressBarSetMsg(index, fmt::format(text, processed, entry_count));
@ -470,7 +470,7 @@ namespace rsx
{ {
ref_cnt++; ref_cnt++;
Emu.CallAfter([&]() Emu.CallAfter([&, index, value]()
{ {
dlg->ProgressBarInc(index, value); dlg->ProgressBarInc(index, value);
ref_cnt--; ref_cnt--;
@ -481,7 +481,7 @@ namespace rsx
{ {
ref_cnt++; ref_cnt++;
Emu.CallAfter([&]() Emu.CallAfter([&, index, limit]()
{ {
dlg->ProgressBarSetLimit(index, limit); dlg->ProgressBarSetLimit(index, limit);
ref_cnt--; ref_cnt--;