Skip to content

Commit

Permalink
Get the project to build again
Browse files Browse the repository at this point in the history
  • Loading branch information
fsfod committed Apr 8, 2019
1 parent 7607cf9 commit cb895be
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 23 deletions.
20 changes: 12 additions & 8 deletions 3RVX/3RVX.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{CC4D05DB-E255-4F26-B71C-455CC100ED54}</ProjectGuid>
<RootNamespace>My3RVX</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -107,7 +107,7 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mklink /j "$(TargetDir)\Skins" "$(ProjectDir)\..\Skins" || mklink /j "$(TargetDir)\Languages" "$(ProjectDir)\..\Languages" || exit /B 0</Command>
Expand All @@ -127,7 +127,7 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mklink /j "$(TargetDir)\Skins" "$(ProjectDir)\..\Skins" || mklink /j "$(TargetDir)\Languages" "$(ProjectDir)\..\Languages" || exit /B 0</Command>
Expand All @@ -148,7 +148,7 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mklink /j "$(TargetDir)\Skins" "$(ProjectDir)\..\Skins" || mklink /j "$(TargetDir)\Languages" "$(ProjectDir)\..\Languages" || exit /B 0</Command>
Expand All @@ -168,7 +168,7 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mklink /j "$(TargetDir)\Skins" "$(ProjectDir)\..\Skins" || mklink /j "$(TargetDir)\Languages" "$(ProjectDir)\..\Languages" || exit /B 0</Command>
Expand All @@ -187,7 +187,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mklink /j "$(TargetDir)\Skins" "$(ProjectDir)\..\Skins" || mklink /j "$(TargetDir)\Languages" "$(ProjectDir)\..\Languages" || exit /B 0</Command>
Expand All @@ -206,7 +206,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mklink /j "$(TargetDir)\Skins" "$(ProjectDir)\..\Skins" || mklink /j "$(TargetDir)\Languages" "$(ProjectDir)\..\Languages" || exit /B 0</Command>
Expand All @@ -216,6 +216,8 @@
<ClInclude Include="3RVX.h" />
<ClInclude Include="CommCtl.h" />
<ClInclude Include="Controllers\BrightnessController.h" />
<ClInclude Include="Controllers\Brightness\DDCBrightnessController.h" />
<ClInclude Include="Controllers\Brightness\WMIBrightnessController.h" />
<ClInclude Include="Controllers\Volume\CoreAudio.h" />
<ClInclude Include="Controllers\Volume\CurveTransformer.h" />
<ClInclude Include="Controllers\Volume\VolumeLimiter.h" />
Expand Down Expand Up @@ -286,12 +288,14 @@
<ItemGroup>
<ClCompile Include="3RVX.cpp" />
<ClCompile Include="3RVXConsts.cpp" />
<ClCompile Include="Controllers\BrightnessController.cpp" />
<ClCompile Include="Controllers\Brightness\DDCBrightnessController.cpp" />
<ClCompile Include="Controllers\Brightness\WMIBrightnessController.cpp" />
<ClCompile Include="Controllers\Volume\CoreAudio.cpp" />
<ClCompile Include="D3DDevice.cpp" />
<ClCompile Include="DriveInfo.cpp" />
<ClCompile Include="DisplayManager.cpp" />
<ClCompile Include="Error.cpp" />
<ClCompile Include="HideWin10VolumeOSD.cpp" />
<ClCompile Include="MeterWnd\Meters\HorizontalSliderKnob.cpp" />
<ClCompile Include="MeterWnd\Meters\SliderKnob.cpp" />
<ClCompile Include="MeterWnd\Meters\VerticalSliderKnob.cpp" />
Expand Down
18 changes: 15 additions & 3 deletions 3RVX/3RVX.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@
<ClInclude Include="D3DDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Controllers\Brightness\DDCBrightnessController.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="Controllers\Brightness\WMIBrightnessController.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Controllers\Volume\CoreAudio.cpp">
Expand Down Expand Up @@ -362,9 +368,6 @@
<ClCompile Include="OSD\BrightnessOSD.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Controllers\BrightnessController.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Skin\ErrorSkin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -386,6 +389,15 @@
<ClCompile Include="D3DDevice.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Controllers\Brightness\DDCBrightnessController.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Controllers\Brightness\WMIBrightnessController.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="HideWin10VolumeOSD.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="3RVX.rc">
Expand Down
4 changes: 2 additions & 2 deletions 3RVX/COMUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

class COMUtil {
public:
template <class T> static void COMUtil::SafeRelease(T *p) {
template <class T> static void SafeRelease(T *p) {
if (p) {
p->Release();
p = NULL;
}
}

template <class T> static void COMUtil::SafeRelease(T **ppT) {
template <class T> static void SafeRelease(T **ppT) {
if (*ppT) {
(*ppT)->Release();
*ppT = NULL;
Expand Down
7 changes: 4 additions & 3 deletions 3RVX/Controllers/Brightness/DDCBrightnessController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@

#include <Windows.h>
#include <HighLevelMonitorConfigurationAPI.h>
#include "BrightnessController.h"

class Monitor;

class DDCBrightnessController {
class DDCBrightnessController : public BrightnessController{
public:
DDCBrightnessController(HMONITOR monitor);
DDCBrightnessController(Monitor &monitor);

float Brightness();
void Brightness(float level);
float Brightness() override;
void Brightness(float level) override;

private:
HANDLE _monitorHandle;
Expand Down
8 changes: 4 additions & 4 deletions Settings/Controls/Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,22 +207,22 @@ BOOL Control::Scroll(bool horizontal, WORD request, WORD position) {
return FALSE;
}

long Control::WindowAttributes(int index) {
LONG_PTR Control::WindowAttributes(int index) {
return GetWindowLongPtr(_hWnd, index);
}

void Control::WindowAttributes(int index, long value) {
void Control::WindowAttributes(int index, LONG_PTR value) {
SetWindowLongPtr(_hWnd, index, value);
}

void Control::AddWindowAttribute(int index, long attribute) {
long attr = WindowAttributes(index);
LONG_PTR attr = WindowAttributes(index);
attr |= attribute;
WindowAttributes(index, attr);
}

void Control::RemoveWindowAttribute(int index, long attribute) {
long attr = WindowAttributes(index);
LONG_PTR attr = WindowAttributes(index);
attr &= ~attribute;
WindowAttributes(index, attr);
}
4 changes: 2 additions & 2 deletions Settings/Controls/Control.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Control {
/// The index of the attribute to retrieve. Common indexes include
/// GWL_STYLE, GWL_EXSTYLE, etc.
/// </param>
long WindowAttributes(int index);
LONG_PTR WindowAttributes(int index);

/// <summary>
/// Sets the window attributes of this control. See the SetWindowLongPtr
Expand All @@ -89,7 +89,7 @@ class Control {
/// GWL_STYLE, GWL_EXSTYLE, etc.
/// </param>
/// <param name="value">New value of the attribute</param>
void WindowAttributes(int index, long value);
void WindowAttributes(int index, LONG_PTR value);

/// <summary>
/// Adds a window attribute to this control; same as retrieving the window
Expand Down
2 changes: 1 addition & 1 deletion Settings/Settings.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<ProjectGuid>{302FD0A1-5C6B-4370-847A-496A762EA0CF}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Settings</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down

0 comments on commit cb895be

Please sign in to comment.