mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 17:28:36 +12:00
rsx/overlays: Introduce 'native' HUD UI and implement some common dialogs (#4011)
This commit is contained in:
parent
34c49c77b2
commit
71f69d1d48
56 changed files with 3682 additions and 213 deletions
|
@ -1,9 +1,38 @@
|
|||
#include "save_data_dialog.h"
|
||||
#include "save_data_list_dialog.h"
|
||||
|
||||
#include <Emu/IdManager.h>
|
||||
#include <Emu/RSX/GSRender.h>
|
||||
|
||||
s32 save_data_dialog::ShowSaveDataList(std::vector<SaveDataEntry>& save_entries, s32 focused, u32 op, vm::ptr<CellSaveDataListSet> listSet)
|
||||
{
|
||||
save_data_list_dialog sdid(save_entries, focused, op, listSet);
|
||||
sdid.exec();
|
||||
return sdid.GetSelection();
|
||||
//TODO: Install native shell as an Emu callback
|
||||
if (auto rsxthr = fxm::get<GSRender>())
|
||||
{
|
||||
if (auto native_dlg = rsxthr->shell_open_save_dialog())
|
||||
{
|
||||
auto result = native_dlg->show(save_entries, op, listSet);
|
||||
if (result != rsx::overlays::user_interface::selection_code::error)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//Fall back to front-end GUI
|
||||
atomic_t<bool> dlg_result(false);
|
||||
atomic_t<s32> selection;
|
||||
|
||||
Emu.CallAfter([&]()
|
||||
{
|
||||
save_data_list_dialog sdid(save_entries, focused, op, listSet);
|
||||
sdid.exec();
|
||||
selection = sdid.GetSelection();
|
||||
dlg_result = true;
|
||||
});
|
||||
|
||||
while (!dlg_result)
|
||||
{
|
||||
thread_ctrl::wait_for(1000);
|
||||
}
|
||||
|
||||
return selection.load();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue