| 90 | } |
| 91 | |
| 92 | Result EditUser(std::function<void(AccountProfileBase*, AccountUserData*)> cb) { |
| 93 | AccountProfile prof; |
| 94 | auto rc = accountGetProfile(&prof, g_SelectedUser); |
| 95 | if(R_SUCCEEDED(rc)) { |
| 96 | AccountProfileBase prof_base = {}; |
| 97 | AccountUserData user_data = {}; |
| 98 | rc = accountProfileGet(&prof, &user_data, &prof_base); |
| 99 | if(R_SUCCEEDED(rc)) { |
| 100 | AccountExtProfileEditor editor; |
| 101 | rc = accountextGetProfileEditor(g_SelectedUser, &editor); |
| 102 | if(R_SUCCEEDED(rc)) { |
| 103 | cb(&prof_base, &user_data); |
| 104 | rc = accountextProfileEditorStore(&editor, &prof_base, &user_data); |
| 105 | accountextProfileEditorClose(&editor); |
| 106 | } |
| 107 | } |
| 108 | accountProfileClose(&prof); |
| 109 | } |
| 110 | return rc; |
| 111 | } |
| 112 | |
| 113 | Result EditUserIcon(const u8 *jpg, const size_t size) { |
| 114 | AccountProfile prof; |
no outgoing calls
no test coverage detected