MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / SetSelectedUser

Method SetSelectedUser

projects/uMenu/source/ul/menu/ui/ui_Common.cpp:252–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250 }
251
252 void GlobalSettings::SetSelectedUser(const AccountUid user_id) {
253 this->system_status.selected_user = user_id;
254
255 this->InitializeEntries();
256 // The last_menu_fs_path sent by uSystem was empty if a user was not yet selected
257 // We need to set it to the user root menu path to properly load the main menu
258 this->initial_last_menu_fs_path = GetActiveMenuPath();
259 util::CopyToStringBuffer(this->system_status.last_menu_fs_path, GetActiveMenuPath());
260 util::CopyToStringBuffer(this->system_status.last_menu_path, "");
261 this->system_status.last_menu_index = 0;
262
263 UL_RC_ASSERT(smi::SetSelectedUser(user_id));
264 UL_RC_ASSERT(smi::UpdateMenuPaths(this->system_status.last_menu_fs_path, this->system_status.last_menu_path));
265 UL_RC_ASSERT(smi::UpdateMenuIndex(this->system_status.last_menu_index));
266
267 LoadSelectedUserIconTexture();
268 }
269
270 pu::sdl2::TextureHandle::Ref LoadApplicationIconTexture(const u64 app_id) {
271 u64 icon_size;

Callers 1

user_DefaultKeyMethod · 0.80

Calls 6

InitializeEntriesMethod · 0.95
CopyToStringBufferFunction · 0.85
SetSelectedUserFunction · 0.85
UpdateMenuPathsFunction · 0.85
UpdateMenuIndexFunction · 0.85

Tested by

no test coverage detected