FullscreenUI: Use native file selector on Flatpak

This commit is contained in:
Stenzek
2024-05-12 20:22:37 +10:00
parent 37a76a020a
commit 522c2e3458
7 changed files with 121 additions and 6 deletions

View File

@@ -314,3 +314,16 @@ void GetChoiceDialogHelpText(SmallStringBase& dest);
void GetFileSelectorHelpText(SmallStringBase& dest);
void GetInputDialogHelpText(SmallStringBase& dest);
} // namespace ImGuiFullscreen
// Host UI triggers from Big Picture mode.
namespace Host {
/// Returns true if native file dialogs should be preferred over Big Picture.
bool ShouldPreferHostFileSelector();
/// Opens a file selector dialog.
using FileSelectorCallback = std::function<void(const std::string& path)>;
using FileSelectorFilters = std::vector<std::string>;
void OpenHostFileSelectorAsync(std::string_view title, bool select_directory, FileSelectorCallback callback,
FileSelectorFilters filters = FileSelectorFilters(),
std::string_view initial_directory = std::string_view());
} // namespace Host