RSX: add taskbar progress to native ui progress dialogs

This commit is contained in:
Megamouse 2018-06-08 15:20:38 +02:00 committed by kd-11
parent 17250bc2d4
commit 4003aacc6a
8 changed files with 71 additions and 6 deletions

View file

@ -275,6 +275,28 @@ void rpcs3_app::InitializeCallbacks()
callbacks.on_stop = [=]() { OnEmulatorStop(); };
callbacks.on_ready = [=]() { OnEmulatorReady(); };
callbacks.handle_taskbar_progress = [=](s32 type, s32 value)
{
if (gameWindow)
{
switch (type)
{
case 0:
((gs_frame*)gameWindow)->progress_reset();
break;
case 1:
((gs_frame*)gameWindow)->progress_increment(value);
break;
case 2:
((gs_frame*)gameWindow)->progress_set_limit(value);
break;
default:
LOG_FATAL(GENERAL, "Unknown type in handle_taskbar_progress(type=%d, value=%d)", type, value);
break;
}
}
};
Emu.SetCallbacks(std::move(callbacks));
}