Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion include/utility/fsutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ struct SKIF_CommonPathsCache {
{ FOLDERID_Documents,
L"%USERPROFILE%\\My Documents"
};
win_path_s my_pictures =
{ FOLDERID_Pictures,
L"%USERPROFILE%\\My Documents\\My Pictures"
};
win_path_s app_data_local =
{ FOLDERID_LocalAppData,
L"%USERPROFILE%\\AppData\\Local"
Expand Down Expand Up @@ -92,7 +96,9 @@ struct SKIF_CommonPathsCache {
wchar_t skiv_install [MAX_PATH + 2] = { }; // Holds the install folder for SKIV
wchar_t skiv_userdata [MAX_PATH + 2] = { }; // Holds the user data folder for SKIV
wchar_t specialk_userdata [MAX_PATH + 2] = { }; // Holds the user data folder for SK (often lines up with its install folder)
wchar_t skiv_temp [MAX_PATH + 2] = { }; // Holds the temp data folder for SKIV (images downloaded from the web; cleared out on every launch): %APPDATA%\TEMP\SKIV\
wchar_t skiv_temp [MAX_PATH + 2] = { }; // Holds the temp data folder for SKIV (images downloaded from the web; cleared out on every launch): %APPDATA%\TEMP\SKIV
wchar_t skiv_screenshots [MAX_PATH + 2] = { }; // Holds the screenshot folder for SKIV
char skiv_screenshotsA [MAX_PATH + 2] = { }; // UTF-8


// Functions
Expand Down
15 changes: 13 additions & 2 deletions include/utility/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,29 @@ static const ParamsPQ PQ =

#pragma warning( pop )

struct SKIV_Region {
ImRect _rect;
std::wstring _title;

SKIV_Region (ImRect r_ = ImRect(), std::wstring t_ = L"")
{
_rect = r_;
_title = t_;
}
};

// Declarations
DirectX::XMVECTOR SKIV_Image_PQToLinear (DirectX::XMVECTOR N, DirectX::XMVECTOR maxPQValue = DirectX::g_XMOne);
DirectX::XMVECTOR SKIV_Image_LinearToPQ (DirectX::XMVECTOR N, DirectX::XMVECTOR maxPQValue = DirectX::g_XMOne);
float SKIV_Image_LinearToPQY (float N);
DirectX::XMVECTOR SKIV_Image_Rec709toICtCp (DirectX::XMVECTOR N);
DirectX::XMVECTOR SKIV_Image_ICtCptoRec709 (DirectX::XMVECTOR N);

bool SKIV_Image_CopyToClipboard (const DirectX::Image* pImage, bool snipped, bool isHDR);
bool SKIV_Image_CopyToClipboard (const DirectX::Image* pImage, bool isHDR, bool isTemp, const wchar_t* wszFileName);
HRESULT SKIV_Image_SaveToDisk_HDR (const DirectX::Image& image, const wchar_t* wszFileName);
HRESULT SKIV_Image_SaveToDisk_SDR (const DirectX::Image& image, const wchar_t* wszFileName, bool force_sRGB);
HRESULT SKIV_Image_CaptureDesktop (DirectX::ScratchImage& image, POINT pos, int flags = 0x0);
void SKIV_Image_CaptureRegion (ImRect capture_area);
void SKIV_Image_CaptureRegion (SKIV_Region capture_area);
HRESULT SKIV_Image_TonemapToSDR (const DirectX::Image& image, DirectX::ScratchImage& final_sdr, float mastering_max_nits, float mastering_sdr_nits);

bool SKIV_Image_IsUltraHDR (const wchar_t* wszFileName);
Expand Down
10 changes: 10 additions & 0 deletions include/utility/registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ struct SKIF_RegistrySettings {
SKIF_MakeRegKeyB ( LR"(SOFTWARE\Kaldaien\Special K\Viewer\)",
LR"(99th Percentile MaxCLL)" );

KeyValue <bool> regKVSaveScreenshots =
SKIF_MakeRegKeyB ( LR"(SOFTWARE\Kaldaien\Special K\Viewer\)",
LR"(Save Screenshots)" );

// Integers (DWORDs)

KeyValue <int> regKVImageScaling =
Expand Down Expand Up @@ -357,6 +361,10 @@ struct SKIF_RegistrySettings {
SKIF_MakeRegKeyWS ( LR"(SOFTWARE\Kaldaien\Special K\Viewer\)",
LR"(Path)" );

KeyValue <std::wstring> regKVPathScreenshots =
SKIF_MakeRegKeyWS ( LR"(SOFTWARE\Kaldaien\Special K\Viewer\)",
LR"(Screenshots)" );

KeyValue <std::wstring> regKVAutoUpdateVersion =
SKIF_MakeRegKeyWS ( LR"(SOFTWARE\Kaldaien\Special K\Viewer\)",
LR"(Auto-Update Version)" );
Expand Down Expand Up @@ -451,11 +459,13 @@ struct SKIF_RegistrySettings {
bool bFadeCovers = true;
bool bControllers = true; // Should SKIF support controller input ?
bool bLoggingDeveloper = false; // This is a log level "above" verbose logging that also includes stuff like window messages. Only useable for SKIF developers
bool bSaveScreenshots = true;

// Wide strings
std::wstring wsUpdateChannel = L"Website"; // Default to stable channel
std::wstring wsIgnoreUpdate;
std::wstring wsPathViewer;
std::wstring wsPathScreenshots;
std::wstring wsPathSpecialK;
std::wstring wsAutoUpdateVersion; // Holds the version the auto-updater is trying to install
std::wstring wsDefaultHDRExt = L".png";
Expand Down
1 change: 1 addition & 0 deletions include/utility/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ std::wstring SKIF_Util_GetClipboardHDROP (void);
DirectX::Image SKIF_Util_GetClipboardBitmapData (void);
std::wstring SKIF_Util_AddEnvironmentBlock (const void* pEnvBlock, const std::wstring& varName, const std::wstring& varValue);
void SKIF_Util_FileExplorer_SelectFile (PCWSTR filePath);
std::wstring SKIF_Util_FileExplorer_BrowseFolder (PCWSTR defaultPath);
std::string SKIF_Util_GetWindowMessageAsStr (UINT msg);


Expand Down
Loading
Loading