Skip to content

Commit 1302c6b

Browse files
committed
Release 1.0.1
Initial
1 parent bf36a7a commit 1302c6b

File tree

98 files changed

+29926
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+29926
-1
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Heiko-T
3+
Copyright (c) 2020 Heiko-Thome
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Photoshop/IconBig.bmp

48.1 KB
Binary file not shown.

Photoshop/Logo.bmp

3.05 KB
Binary file not shown.

Photoshop/Logo.psd

862 KB
Binary file not shown.

Photoshop/LogoWide.bmp

274 KB
Binary file not shown.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# HDR Profile
22

3+
You can add applications to HDR Profile to automatically activate HDR in Windows when one of hte added processes is running.
4+
5+
The tool is using NVApi (copied some code from https://github.com/bradgearon/hdr-switch, thank you!), so I think this will only work with NVidia graphic cards.
6+
7+
If you choose "Focused" HDR will be activated when one of the added application is in focus and will deactivate HDR, when none of the added app is in focus.
8+
9+
Running mode works the same, but as the name says, it is not neccessary for the application to be in focus.
10+
11+
For the moment, the tool is only looking for the process name and not the location of the file.

Screenshot_1-0-0.png

21 KB
Loading

Source/Debug_x64/HDRProfile.exe

1.03 MB
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<configSections>
4+
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
5+
<section name="HDRProfile.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
6+
</sectionGroup>
7+
</configSections>
8+
<startup>
9+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
10+
</startup>
11+
<userSettings>
12+
<HDRProfile.Properties.Settings>
13+
<setting name="Top" serializeAs="String">
14+
<value>0</value>
15+
</setting>
16+
<setting name="Left" serializeAs="String">
17+
<value>0</value>
18+
</setting>
19+
<setting name="Maximized" serializeAs="String">
20+
<value>False</value>
21+
</setting>
22+
<setting name="Height" serializeAs="String">
23+
<value>480</value>
24+
</setting>
25+
<setting name="Width" serializeAs="String">
26+
<value>640</value>
27+
</setting>
28+
</HDRProfile.Properties.Settings>
29+
</userSettings>
30+
</configuration>
8.5 KB
Binary file not shown.
16 KB
Binary file not shown.

Source/Externals/HDRController.dll

246 KB
Binary file not shown.
Binary file not shown.

Source/Externals/nvapi64.lib

511 KB
Binary file not shown.
323 KB
Binary file not shown.
511 KB
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30804.86
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HDRController", "HDRController\HDRController.vcxproj", "{C4273850-BD9B-454D-867A-08EC897675DA}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{C4273850-BD9B-454D-867A-08EC897675DA}.Debug|x64.ActiveCfg = Debug|x64
17+
{C4273850-BD9B-454D-867A-08EC897675DA}.Debug|x64.Build.0 = Debug|x64
18+
{C4273850-BD9B-454D-867A-08EC897675DA}.Debug|x86.ActiveCfg = Debug|Win32
19+
{C4273850-BD9B-454D-867A-08EC897675DA}.Debug|x86.Build.0 = Debug|Win32
20+
{C4273850-BD9B-454D-867A-08EC897675DA}.Release|x64.ActiveCfg = Release|x64
21+
{C4273850-BD9B-454D-867A-08EC897675DA}.Release|x64.Build.0 = Release|x64
22+
{C4273850-BD9B-454D-867A-08EC897675DA}.Release|x86.ActiveCfg = Release|Win32
23+
{C4273850-BD9B-454D-867A-08EC897675DA}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {E97C9928-B80A-43BA-8A44-197438E59E46}
30+
EndGlobalSection
31+
EndGlobal

Source/HDRController/HDRController/External.cpp

Whitespace-only changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#include "HDRController.h"
2+
3+
#include <iostream>
4+
#include "toggle.h"
5+
#include "WinUser.h"
6+
#include <stdio.h>
7+
8+
9+
10+
using namespace core;
11+
12+
static std::unique_ptr<Toggle> hdrToggle;
13+
14+
15+
static void showError(std::string msg)
16+
{
17+
LPCWSTR lmsg = (LPCWSTR)msg.c_str();
18+
19+
MessageBox(NULL, lmsg, L"HDR Switch Error", MB_OK | MB_ICONWARNING);
20+
}
21+
22+
static void setHdrMode(bool enabled)
23+
{
24+
auto status = hdrToggle->setHdrMode(enabled);
25+
if (!status.IsSuccessful)
26+
{
27+
auto msg = "Error setting hdr mode:" + status.Message;
28+
showError(msg);
29+
}
30+
}
31+
32+
extern "C"
33+
{
34+
__declspec(dllexport) void SetHDR(bool enabled)
35+
{
36+
setHdrMode(enabled);
37+
}
38+
}
39+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace core
2+
{
3+
class HDRController
4+
{
5+
public:
6+
void setHdrMode(bool enabled);
7+
};
8+
9+
}
10+
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{c4273850-bd9b-454d-867a-08ec897675da}</ProjectGuid>
25+
<RootNamespace>HDRController</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>DynamicLibrary</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v142</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v142</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>DynamicLibrary</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v142</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>DynamicLibrary</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v142</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
<OutDir>$(SolutionDir)\Release_x86</OutDir>
76+
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
78+
<LinkIncremental>false</LinkIncremental>
79+
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
81+
<LinkIncremental>true</LinkIncremental>
82+
<OutDir>$(SolutionDir)\Release_x64</OutDir>
83+
</PropertyGroup>
84+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
85+
<LinkIncremental>false</LinkIncremental>
86+
</PropertyGroup>
87+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
88+
<ClCompile>
89+
<WarningLevel>Level3</WarningLevel>
90+
<SDLCheck>true</SDLCheck>
91+
<PreprocessorDefinitions>WIN32;_DEBUG;HDRCONTROLLER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92+
<ConformanceMode>true</ConformanceMode>
93+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
94+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
95+
<AdditionalIncludeDirectories>$(SolutionDir)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
96+
<AdditionalOptions>/std:c++17 %(AdditionalOptions)</AdditionalOptions>
97+
</ClCompile>
98+
<Link>
99+
<SubSystem>Windows</SubSystem>
100+
<GenerateDebugInformation>true</GenerateDebugInformation>
101+
<EnableUAC>false</EnableUAC>
102+
<AdditionalDependencies>nvapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
103+
</Link>
104+
</ItemDefinitionGroup>
105+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
106+
<ClCompile>
107+
<WarningLevel>Level3</WarningLevel>
108+
<FunctionLevelLinking>true</FunctionLevelLinking>
109+
<IntrinsicFunctions>true</IntrinsicFunctions>
110+
<SDLCheck>true</SDLCheck>
111+
<PreprocessorDefinitions>WIN32;NDEBUG;HDRCONTROLLER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
112+
<ConformanceMode>true</ConformanceMode>
113+
<PrecompiledHeader>Use</PrecompiledHeader>
114+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
115+
</ClCompile>
116+
<Link>
117+
<SubSystem>Windows</SubSystem>
118+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
119+
<OptimizeReferences>true</OptimizeReferences>
120+
<GenerateDebugInformation>true</GenerateDebugInformation>
121+
<EnableUAC>false</EnableUAC>
122+
</Link>
123+
</ItemDefinitionGroup>
124+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
125+
<ClCompile>
126+
<WarningLevel>Level3</WarningLevel>
127+
<SDLCheck>true</SDLCheck>
128+
<PreprocessorDefinitions>_DEBUG;HDRCONTROLLER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
129+
<ConformanceMode>true</ConformanceMode>
130+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
131+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
132+
<AdditionalIncludeDirectories>$(SolutionDir)\Include</AdditionalIncludeDirectories>
133+
<AdditionalOptions>/std:c++17 %(AdditionalOptions)</AdditionalOptions>
134+
</ClCompile>
135+
<Link>
136+
<SubSystem>Windows</SubSystem>
137+
<GenerateDebugInformation>true</GenerateDebugInformation>
138+
<EnableUAC>false</EnableUAC>
139+
<AdditionalDependencies>nvapi64.lib;%(AdditionalDependencies)</AdditionalDependencies>
140+
</Link>
141+
</ItemDefinitionGroup>
142+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
143+
<ClCompile>
144+
<WarningLevel>Level3</WarningLevel>
145+
<FunctionLevelLinking>true</FunctionLevelLinking>
146+
<IntrinsicFunctions>true</IntrinsicFunctions>
147+
<SDLCheck>true</SDLCheck>
148+
<PreprocessorDefinitions>NDEBUG;HDRCONTROLLER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
149+
<ConformanceMode>true</ConformanceMode>
150+
<PrecompiledHeader>Use</PrecompiledHeader>
151+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
152+
</ClCompile>
153+
<Link>
154+
<SubSystem>Windows</SubSystem>
155+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
156+
<OptimizeReferences>true</OptimizeReferences>
157+
<GenerateDebugInformation>true</GenerateDebugInformation>
158+
<EnableUAC>false</EnableUAC>
159+
</Link>
160+
</ItemDefinitionGroup>
161+
<ItemGroup>
162+
<ClInclude Include="framework.h" />
163+
<ClInclude Include="HDRController.h" />
164+
<ClInclude Include="nvapi_deps.h" />
165+
<ClInclude Include="pch.h" />
166+
<ClInclude Include="sdk_status.h" />
167+
<ClInclude Include="toggle.h" />
168+
</ItemGroup>
169+
<ItemGroup>
170+
<ClCompile Include="dllmain.cpp" />
171+
<ClCompile Include="HDRController.cpp" />
172+
<ClCompile Include="pch.cpp">
173+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
174+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
175+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
176+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
177+
</ClCompile>
178+
<ClCompile Include="sdk_status.cpp" />
179+
<ClCompile Include="toggle.cpp" />
180+
</ItemGroup>
181+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
182+
<ImportGroup Label="ExtensionTargets">
183+
</ImportGroup>
184+
</Project>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Quelldateien">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Headerdateien">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Ressourcendateien">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClInclude Include="framework.h">
19+
<Filter>Headerdateien</Filter>
20+
</ClInclude>
21+
<ClInclude Include="pch.h">
22+
<Filter>Headerdateien</Filter>
23+
</ClInclude>
24+
<ClInclude Include="HDRController.h">
25+
<Filter>Headerdateien</Filter>
26+
</ClInclude>
27+
<ClInclude Include="sdk_status.h">
28+
<Filter>Headerdateien</Filter>
29+
</ClInclude>
30+
<ClInclude Include="toggle.h">
31+
<Filter>Headerdateien</Filter>
32+
</ClInclude>
33+
<ClInclude Include="nvapi_deps.h">
34+
<Filter>Headerdateien</Filter>
35+
</ClInclude>
36+
</ItemGroup>
37+
<ItemGroup>
38+
<ClCompile Include="dllmain.cpp">
39+
<Filter>Quelldateien</Filter>
40+
</ClCompile>
41+
<ClCompile Include="pch.cpp">
42+
<Filter>Quelldateien</Filter>
43+
</ClCompile>
44+
<ClCompile Include="HDRController.cpp">
45+
<Filter>Quelldateien</Filter>
46+
</ClCompile>
47+
<ClCompile Include="sdk_status.cpp">
48+
<Filter>Quelldateien</Filter>
49+
</ClCompile>
50+
<ClCompile Include="toggle.cpp">
51+
<Filter>Quelldateien</Filter>
52+
</ClCompile>
53+
</ItemGroup>
54+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
2+
#include "pch.h"
3+
4+
BOOL APIENTRY DllMain( HMODULE hModule,
5+
DWORD ul_reason_for_call,
6+
LPVOID lpReserved
7+
)
8+
{
9+
switch (ul_reason_for_call)
10+
{
11+
case DLL_PROCESS_ATTACH:
12+
case DLL_THREAD_ATTACH:
13+
case DLL_THREAD_DETACH:
14+
case DLL_PROCESS_DETACH:
15+
break;
16+
}
17+
return TRUE;
18+
}
19+

0 commit comments

Comments
 (0)