Native UI refactored (#4623)

Refactor and improve native overlays
This commit is contained in:
kd-11 2018-05-20 23:05:00 +03:00 committed by GitHub
parent 68fff54a8b
commit f6f45b8699
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 310 additions and 219 deletions

View file

@ -2,19 +2,16 @@
#include "save_data_list_dialog.h"
#include <Emu/IdManager.h>
#include <Emu/RSX/GSRender.h>
#include <Emu/RSX/Overlays/overlays.h>
s32 save_data_dialog::ShowSaveDataList(std::vector<SaveDataEntry>& save_entries, s32 focused, u32 op, vm::ptr<CellSaveDataListSet> listSet)
{
//TODO: Install native shell as an Emu callback
if (auto rsxthr = fxm::get<GSRender>())
if (auto manager = fxm::get<rsx::overlays::display_manager>())
{
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;
}
auto result = manager->create<rsx::overlays::save_dialog>()->show(save_entries, op, listSet);
if (result != rsx::overlays::user_interface::selection_code::error)
return result;
}
//Fall back to front-end GUI