ppsspp/Windows/W32Util/ShellUtil.h
Henrik Rydgård 4d0f3183f2 Windows: When using "Create shortcut", use the game's icon instead of PPSSPP's.
Since on Windows, shortcuts can't embed icons, we first save the game's
icon .png as an .ico in the SAVESTATE folder (there might be a better
place, but it also doesn't seem worth it to create a new folder for
this).

Part of #10885 (Android functionality still missing, for example).
2024-05-13 01:37:53 +02:00

27 lines
1.0 KiB
C++

#pragma once
#include <string>
#include <string_view>
#include <vector>
#include <thread>
class Path;
namespace W32Util
{
// Can't make initialPath a string_view, need the null so might as well require it.
std::string BrowseForFolder(HWND parent, std::string_view title, std::string_view initialPath);
std::string BrowseForFolder(HWND parent, const wchar_t *title, std::string_view initialPath);
bool BrowseForFileName(bool _bLoad, HWND _hParent, const wchar_t*_pTitle,
const wchar_t *_pInitialFolder, const wchar_t *_pFilter, const wchar_t*_pExtension,
std::string& _strFileName);
std::vector<std::string> BrowseForFileNameMultiSelect(bool _bLoad, HWND _hParent, const wchar_t*_pTitle,
const wchar_t*_pInitialFolder, const wchar_t*_pFilter, const wchar_t*_pExtension);
std::string UserDocumentsPath();
bool CreateDesktopShortcut(std::string_view argumentPath, std::string_view gameTitle, const Path &icoFile);
bool CreateICOFromPNGData(const uint8_t *imageData, size_t imageDataSize, const Path &icoPath);
} // namespace