Skip to content

Commit

Permalink
Applied AStyle code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
clsid2 committed Jan 20, 2020
1 parent 1643206 commit 9772b9f
Show file tree
Hide file tree
Showing 142 changed files with 2,504 additions and 1,923 deletions.
4 changes: 2 additions & 2 deletions include/moreuuids.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ DEFINE_GUID(MEDIASUBTYPE_VP90,

// 31305641-0000-0010-8000-00AA00389B71
DEFINE_GUID(MEDIASUBTYPE_AV01,
0x31305641, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
0x31305641, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);

DEFINE_GUID(MEDIASUBTYPE_IMA4,
0x34616D69, 0x000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
Expand Down Expand Up @@ -401,7 +401,7 @@ DEFINE_GUID(CLSID_DXR,
0x760a8f35, 0x97e7, 0x479d, 0xaa, 0xf5, 0xda, 0x9e, 0xff, 0x95, 0xd7, 0x51);

DEFINE_GUID(CLSID_MPCVR,
0x71F080AA, 0x8661, 0x4093, 0xB1, 0x5E, 0x4F, 0x69, 0x03, 0xE7, 0x7D, 0x0A);
0x71F080AA, 0x8661, 0x4093, 0xB1, 0x5E, 0x4F, 0x69, 0x03, 0xE7, 0x7D, 0x0A);


//
Expand Down
79 changes: 40 additions & 39 deletions src/DSUtil/VersionHelpersInternal.h
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
/*
* (C) 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
* MPC-HC is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* MPC-HC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

#pragma once

#include <VersionHelpers.h>

// Remove once newer SDK is used
#ifndef _WIN32_WINNT_WINTHRESHOLD

#define _WIN32_WINNT_WINTHRESHOLD 0x0A00

VERSIONHELPERAPI
IsWindows10OrGreater()
{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINTHRESHOLD), LOBYTE(_WIN32_WINNT_WINTHRESHOLD), 0);
}

#endif

/*
* (C) 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
* MPC-HC is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* MPC-HC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

#pragma once

#include <VersionHelpers.h>

// Remove once newer SDK is used
#ifndef _WIN32_WINNT_WINTHRESHOLD

#define _WIN32_WINNT_WINTHRESHOLD 0x0A00

VERSIONHELPERAPI
IsWindows10OrGreater()
{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINTHRESHOLD), LOBYTE(_WIN32_WINNT_WINTHRESHOLD), 0);
}

#endif

typedef LONG NTSTATUS, * PNTSTATUS;
#define STATUS_SUCCESS (0x00000000)

typedef NTSTATUS(WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);

inline RTL_OSVERSIONINFOW GetRealOSVersion() {
inline RTL_OSVERSIONINFOW GetRealOSVersion()
{
HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
if (hMod) {
RtlGetVersionPtr fxPtr = (RtlGetVersionPtr)::GetProcAddress(hMod, "RtlGetVersion");
Expand All @@ -54,4 +55,4 @@ inline RTL_OSVERSIONINFOW GetRealOSVersion() {
}
RTL_OSVERSIONINFOW rovi = { 0 };
return rovi;
}
}
8 changes: 6 additions & 2 deletions src/SubPic/SubPicAllocatorPresenterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ void CSubPicAllocatorPresenterImpl::InitMaxSubtitleTextureSize(int maxSize, CSiz
m_maxSubtitleTextureSize = desktopSize;
m_SubtitleTextureLimit = DESKTOP;
// keep size within sane limits
if (m_maxSubtitleTextureSize.cx > 7680) m_maxSubtitleTextureSize.cx = 7680;
if (m_maxSubtitleTextureSize.cy > 4320) m_maxSubtitleTextureSize.cx = 4320;
if (m_maxSubtitleTextureSize.cx > 7680) {
m_maxSubtitleTextureSize.cx = 7680;
}
if (m_maxSubtitleTextureSize.cy > 4320) {
m_maxSubtitleTextureSize.cx = 4320;
}
break;
case 1:
m_maxSubtitleTextureSize.SetSize(1024, 768);
Expand Down
3 changes: 2 additions & 1 deletion src/Subtitles/DVBSub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,8 @@ void CDVBSub::RemoveOldPages(REFERENCE_TIME rt)
}
}

STDMETHODIMP CDVBSub::GetRelativeTo(POSITION pos, RelativeTo& relativeTo) {
STDMETHODIMP CDVBSub::GetRelativeTo(POSITION pos, RelativeTo& relativeTo)
{
relativeTo = RelativeTo::BEST_FIT;
return S_OK;
}
3 changes: 2 additions & 1 deletion src/Subtitles/PGSSub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ void CPGSSub::RemoveOldSegments(REFERENCE_TIME rt)
}
}

STDMETHODIMP CPGSSub::GetRelativeTo(POSITION pos, RelativeTo& relativeTo) {
STDMETHODIMP CPGSSub::GetRelativeTo(POSITION pos, RelativeTo& relativeTo)
{
relativeTo = RelativeTo::BEST_FIT;
return S_OK;
}
Expand Down
Loading

0 comments on commit 9772b9f

Please sign in to comment.