| 1182 | |
| 1183 | struct OverlaySaveDialog : SaveDialogBase { |
| 1184 | s32 ShowSaveDataList(const std::string &base_dir, |
| 1185 | std::vector<SaveDataEntry> &save_entries, s32 focused, |
| 1186 | u32 op, vm::ptr<CellSaveDataListSet> listSet, |
| 1187 | bool enable_overlay) override { |
| 1188 | rpcsx_android.notice("ShowSaveDataList(save_entries=%d, focused=%d, " |
| 1189 | "op=0x%x, listSet=*0x%x, enable_overlay=%d)", |
| 1190 | save_entries.size(), focused, op, listSet, |
| 1191 | enable_overlay); |
| 1192 | |
| 1193 | bool use_end = sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_BEGIN, 0) >= 0; |
| 1194 | |
| 1195 | auto atExit = AtExit([&] { |
| 1196 | if (use_end) { |
| 1197 | sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_END, 0); |
| 1198 | } |
| 1199 | }); |
| 1200 | |
| 1201 | if (!use_end) { |
| 1202 | rpcsx_android.error( |
| 1203 | "ShowSaveDataList(): Not able to notify DRAWING_BEGIN callback " |
| 1204 | "because one has already been sent!"); |
| 1205 | } |
| 1206 | |
| 1207 | if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>()) { |
| 1208 | rpcsx_android.notice("ShowSaveDataList: Showing native UI dialog"); |
| 1209 | |
| 1210 | s32 result = manager->create<rsx::overlays::save_dialog>()->show( |
| 1211 | base_dir, save_entries, focused, op, listSet, enable_overlay); |
| 1212 | |
| 1213 | if (result != rsx::overlays::user_interface::selection_code::error) { |
| 1214 | rpcsx_android.notice( |
| 1215 | "ShowSaveDataList: Native UI dialog returned with selection %d", |
| 1216 | result); |
| 1217 | |
| 1218 | return result; |
| 1219 | } |
| 1220 | |
| 1221 | rpcsx_android.error("ShowSaveDataList: Native UI dialog returned error"); |
| 1222 | } |
| 1223 | |
| 1224 | return -2; |
| 1225 | } |
| 1226 | }; |
| 1227 | |
| 1228 | class OverlayTrophyNotification : public TrophyNotificationBase { |
no test coverage detected