static void browser_update(filebrowser_t * b, uint64_t input, const char *extensions) { bool ret = true; filebrowser_action_t action = FILEBROWSER_ACTION_NOOP; if (input & (1ULL << RMENU_DEVICE_NAV_DOWN)) action = FILEBROWSER_ACTION_DOWN; else if (input & (1ULL << RMENU_DEVICE_NAV_UP)) action = FILEBROWSER_ACTION_UP; else if (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) action = FILEBROWSER_ACTION_RIGHT; else if (input & (1ULL << RMENU_DEVICE_NAV_LEFT)) action = FILEBROWSER_ACTION_LEFT; else if (input & (1ULL << RMENU_DEVICE_NAV_R2)) action = FILEBROWSER_ACTION_SCROLL_DOWN; else if (input & (1ULL << RMENU_DEVICE_NAV_L2)) action = FILEBROWSER_ACTION_SCROLL_UP; else if (input & (1ULL << RMENU_DEVICE_NAV_A)) action = FILEBROWSER_ACTION_CANCEL; else if (input & (1ULL << RMENU_DEVICE_NAV_START)) { action = FILEBROWSER_ACTION_RESET; filebrowser_set_root(b, default_paths.filesystem_root_dir); strlcpy(b->extensions, extensions, sizeof(b->extensions)); } if(action != FILEBROWSER_ACTION_NOOP) ret = filebrowser_iterate(b, action); if(!ret) rarch_settings_msg(S_MSG_DIR_LOADING_ERROR, S_DELAY_180); }
HRESULT CRetroArchCoreBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) { GetChildById(L"XuiRomList", &m_romlist); GetChildById(L"XuiBackButton1", &m_back); GetChildById(L"XuiTxtRomPath", &m_rompathtitle); filebrowser_set_root(&tmp_browser, "game:"); strlcpy(tmp_browser.extensions, "xex|XEX", sizeof(tmp_browser.extensions)); filebrowser_fetch_directory_entries("game:", &tmp_browser, &m_romlist, &m_rompathtitle); return 0; }
HRESULT CRetroArchShaderBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) { GetChildById(L"XuiRomList", &m_shaderlist); GetChildById(L"XuiBackButton1", &m_back); GetChildById(L"XuiTxtRomPath", &m_shaderpathtitle); filebrowser_set_root(&tmp_browser, "game:\\media\\shaders"); strlcpy(tmp_browser.extensions, "cg|CG", sizeof(tmp_browser.extensions)); filebrowser_fetch_directory_entries("game:\\media\\shaders", &tmp_browser, &m_shaderlist, &m_shaderpathtitle); return 0; }
HRESULT CRetroArchFileBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) { GetChildById(L"XuiRomList", &m_romlist); GetChildById(L"XuiBackButton1", &m_back); GetChildById(L"XuiTxtRomPath", &m_rompathtitle); GetChildById(L"XuiBtnGameDir", &m_dir_game); GetChildById(L"XuiBtnCacheDir", &m_dir_cache); filebrowser_set_root(&browser, g_console.default_rom_startup_dir); strlcpy(tmp_browser.extensions, rarch_console_get_rom_ext(), sizeof(tmp_browser.extensions)); filebrowser_fetch_directory_entries(g_console.default_rom_startup_dir, &browser, &m_romlist, &m_rompathtitle); return 0; }