mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
4665196535
It's really not a good idea to change it. In case someone does have a use case for it, we keep the option anyway, but in developer tools, with a loud warning next to it. Should help #18929 by reducing the number of people causing themselves trouble with the option.
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
//
|
|
// DarwinFileSystemServices.h
|
|
// PPSSPP
|
|
//
|
|
// Created by Serena on 20/01/2023.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "ppsspp_config.h"
|
|
#include "Common/File/Path.h"
|
|
#include "Common/System/Request.h"
|
|
|
|
#define PreferredMemoryStickUserDefaultsKey "UserPreferredMemoryStickDirectoryPath"
|
|
|
|
typedef std::function<void (bool, Path)> DarwinDirectoryPanelCallback;
|
|
|
|
/// A Class providing help functions to work with the FileSystem
|
|
/// on Darwin platforms.
|
|
class DarwinFileSystemServices {
|
|
public:
|
|
/// Present a panel to choose a file or directory.
|
|
static void presentDirectoryPanel(
|
|
DarwinDirectoryPanelCallback panelCallback,
|
|
bool allowFiles = false,
|
|
bool allowDirectories = true,
|
|
BrowseFileType fileType = BrowseFileType::ANY);
|
|
|
|
static Path appropriateMemoryStickDirectoryToUse();
|
|
static void setUserPreferredMemoryStickDirectory(Path);
|
|
static Path defaultMemoryStickPath();
|
|
|
|
static void ClearDelegate();
|
|
private:
|
|
#if PPSSPP_PLATFORM(IOS)
|
|
// iOS only, needed for UIDocumentPickerViewController
|
|
static void *__pickerDelegate;
|
|
#endif // PPSSPP_PLATFORM(IOS)
|
|
};
|
|
|
|
void RestartMacApp();
|