mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-07 23:45:12 +00:00
cellSysutil: Implement DRAWING callbacks
Also fixed a minor race in cellUserInfo regarding status of dialog
This commit is contained in:
parent
248809ca1f
commit
f5beaabded
7 changed files with 80 additions and 11 deletions
|
|
@ -5,21 +5,37 @@
|
|||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Io/interception.h"
|
||||
#include "Emu/RSX/Overlays/overlay_save_dialog.h"
|
||||
#include "Emu/Cell/Modules/cellSysutil.h"
|
||||
|
||||
#include "Utilities/Thread.h"
|
||||
#include "util/logs.hpp"
|
||||
|
||||
LOG_CHANNEL(cellSaveData);
|
||||
|
||||
s32 save_data_dialog::ShowSaveDataList(std::vector<SaveDataEntry>& save_entries, s32 focused, u32 op, vm::ptr<CellSaveDataListSet> listSet, bool enable_overlay)
|
||||
{
|
||||
// TODO: Implement proper error checking in savedata_op?
|
||||
const bool use_end = sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_BEGIN, 0) >= 0;
|
||||
|
||||
if (!use_end)
|
||||
{
|
||||
cellSaveData.error("ShowSaveDataList(): Not able to notify DRAWING_BEGIN callback because one has already been sent!");
|
||||
}
|
||||
|
||||
// TODO: Install native shell as an Emu callback
|
||||
if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
|
||||
{
|
||||
const s32 result = manager->create<rsx::overlays::save_dialog>()->show(save_entries, focused, op, listSet, enable_overlay);
|
||||
if (result != rsx::overlays::user_interface::selection_code::error)
|
||||
{
|
||||
if (use_end) sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_END, 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Emu.HasGui())
|
||||
{
|
||||
if (use_end) sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_END, 0);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
|
@ -45,5 +61,7 @@ s32 save_data_dialog::ShowSaveDataList(std::vector<SaveDataEntry>& save_entries,
|
|||
|
||||
input::SetIntercepted(false);
|
||||
|
||||
if (use_end) sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_END, 0);
|
||||
|
||||
return selection.load();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue