mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
RSX: add taskbar progress to native ui progress dialogs
This commit is contained in:
parent
17250bc2d4
commit
4003aacc6a
8 changed files with 71 additions and 6 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue