20 changes: 0 additions & 20 deletions Externals/fmt/CONTRIBUTING.md

This file was deleted.

5,255 changes: 0 additions & 5,255 deletions Externals/fmt/ChangeLog.rst

This file was deleted.

27 changes: 0 additions & 27 deletions Externals/fmt/LICENSE.rst

This file was deleted.

531 changes: 0 additions & 531 deletions Externals/fmt/README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion Externals/fmt/exports.props
Expand Up @@ -2,7 +2,7 @@
<Project>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(ExternalsDir)fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ExternalsDir)fmt\fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/fmt/fmt
Submodule fmt added at f5e543
32 changes: 16 additions & 16 deletions Externals/fmt/fmt.vcxproj
Expand Up @@ -17,27 +17,27 @@
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src/format.cc" />
<ClCompile Include="src/os.cc" />
<ClCompile Include="fmt/src/format.cc" />
<ClCompile Include="fmt/src/os.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include/fmt/args.h" />
<ClInclude Include="include/fmt/chrono.h" />
<ClInclude Include="include/fmt/color.h" />
<ClInclude Include="include/fmt/compile.h" />
<ClInclude Include="include/fmt/core.h" />
<ClInclude Include="include/fmt/format-inl.h" />
<ClInclude Include="include/fmt/format.h" />
<ClInclude Include="include/fmt/os.h" />
<ClInclude Include="include/fmt/ostream.h" />
<ClInclude Include="include/fmt/printf.h" />
<ClInclude Include="include/fmt/ranges.h" />
<ClInclude Include="include/fmt/std.h" />
<ClInclude Include="include/fmt/xchar.h" />
<ClInclude Include="fmt/include/fmt/args.h" />
<ClInclude Include="fmt/include/fmt/chrono.h" />
<ClInclude Include="fmt/include/fmt/color.h" />
<ClInclude Include="fmt/include/fmt/compile.h" />
<ClInclude Include="fmt/include/fmt/core.h" />
<ClInclude Include="fmt/include/fmt/format-inl.h" />
<ClInclude Include="fmt/include/fmt/format.h" />
<ClInclude Include="fmt/include/fmt/os.h" />
<ClInclude Include="fmt/include/fmt/ostream.h" />
<ClInclude Include="fmt/include/fmt/printf.h" />
<ClInclude Include="fmt/include/fmt/ranges.h" />
<ClInclude Include="fmt/include/fmt/std.h" />
<ClInclude Include="fmt/include/fmt/xchar.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
234 changes: 0 additions & 234 deletions Externals/fmt/include/fmt/args.h

This file was deleted.

2,069 changes: 0 additions & 2,069 deletions Externals/fmt/include/fmt/chrono.h

This file was deleted.

651 changes: 0 additions & 651 deletions Externals/fmt/include/fmt/color.h

This file was deleted.

611 changes: 0 additions & 611 deletions Externals/fmt/include/fmt/compile.h

This file was deleted.

3,323 changes: 0 additions & 3,323 deletions Externals/fmt/include/fmt/core.h

This file was deleted.

1,723 changes: 0 additions & 1,723 deletions Externals/fmt/include/fmt/format-inl.h

This file was deleted.

4,217 changes: 0 additions & 4,217 deletions Externals/fmt/include/fmt/format.h

This file was deleted.

478 changes: 0 additions & 478 deletions Externals/fmt/include/fmt/os.h

This file was deleted.

237 changes: 0 additions & 237 deletions Externals/fmt/include/fmt/ostream.h

This file was deleted.

640 changes: 0 additions & 640 deletions Externals/fmt/include/fmt/printf.h

This file was deleted.

722 changes: 0 additions & 722 deletions Externals/fmt/include/fmt/ranges.h

This file was deleted.

171 changes: 0 additions & 171 deletions Externals/fmt/include/fmt/std.h

This file was deleted.

229 changes: 0 additions & 229 deletions Externals/fmt/include/fmt/xchar.h

This file was deleted.

99 changes: 0 additions & 99 deletions Externals/fmt/src/fmt.cc

This file was deleted.

47 changes: 0 additions & 47 deletions Externals/fmt/src/format.cc

This file was deleted.

361 changes: 0 additions & 361 deletions Externals/fmt/src/os.cc

This file was deleted.

15 changes: 0 additions & 15 deletions Externals/fmt/support/Android.mk

This file was deleted.

1 change: 0 additions & 1 deletion Externals/fmt/support/AndroidManifest.xml

This file was deleted.

2,061 changes: 0 additions & 2,061 deletions Externals/fmt/support/C++.sublime-syntax

This file was deleted.

4 changes: 0 additions & 4 deletions Externals/fmt/support/README

This file was deleted.

20 changes: 0 additions & 20 deletions Externals/fmt/support/Vagrantfile

This file was deleted.

1 change: 0 additions & 1 deletion Externals/fmt/support/bazel/.bazelrc

This file was deleted.

1 change: 0 additions & 1 deletion Externals/fmt/support/bazel/.bazelversion

This file was deleted.

28 changes: 0 additions & 28 deletions Externals/fmt/support/bazel/BUILD.bazel

This file was deleted.

73 changes: 0 additions & 73 deletions Externals/fmt/support/bazel/README.md

This file was deleted.

1 change: 0 additions & 1 deletion Externals/fmt/support/bazel/WORKSPACE.bazel

This file was deleted.

58 changes: 0 additions & 58 deletions Externals/fmt/support/build-docs.py

This file was deleted.

132 changes: 0 additions & 132 deletions Externals/fmt/support/build.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions Externals/fmt/support/cmake/FindSetEnv.cmake

This file was deleted.

26 changes: 0 additions & 26 deletions Externals/fmt/support/cmake/JoinPaths.cmake

This file was deleted.

54 changes: 0 additions & 54 deletions Externals/fmt/support/cmake/cxx14.cmake

This file was deleted.

7 changes: 0 additions & 7 deletions Externals/fmt/support/cmake/fmt-config.cmake.in

This file was deleted.

11 changes: 0 additions & 11 deletions Externals/fmt/support/cmake/fmt.pc.in

This file was deleted.

53 changes: 0 additions & 53 deletions Externals/fmt/support/compute-powers.py

This file was deleted.

581 changes: 0 additions & 581 deletions Externals/fmt/support/docopt.py

This file was deleted.

303 changes: 0 additions & 303 deletions Externals/fmt/support/manage.py

This file was deleted.

201 changes: 0 additions & 201 deletions Externals/fmt/support/printable.py

This file was deleted.

159 changes: 0 additions & 159 deletions Externals/fmt/support/rst2md.py

This file was deleted.

7 changes: 0 additions & 7 deletions Externals/fmt/support/rtd/conf.py

This file was deleted.

2 changes: 0 additions & 2 deletions Externals/fmt/support/rtd/index.rst

This file was deleted.

17 changes: 0 additions & 17 deletions Externals/fmt/support/rtd/theme/layout.html

This file was deleted.

2 changes: 0 additions & 2 deletions Externals/fmt/support/rtd/theme/theme.conf

This file was deleted.

3 changes: 2 additions & 1 deletion Source/Android/jni/GpuDriver.cpp
Expand Up @@ -7,6 +7,7 @@

#include <jni.h>

#include "Common/EnumUtils.h"`
#include "Common/IniFile.h"
#include "jni/AndroidCommon/AndroidCommon.h"
#include "jni/AndroidCommon/IDCache.h"
Expand Down Expand Up @@ -69,7 +70,7 @@ Java_org_dolphinemu_dolphinemu_utils_GpuDriverHelper_00024Companion_getSystemDri
properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
properties2.pNext = &driverProperties;
vkGetPhysicalDeviceProperties2(gpu_list.front(), &properties2);
driverId = fmt::format("{}", driverProperties.driverID);
driverId = fmt::format("{}", Common::ToUnderlying(driverProperties.driverID));
}
else
{
Expand Down
6 changes: 4 additions & 2 deletions Source/Core/Common/HRWrap.cpp
Expand Up @@ -3,13 +3,15 @@

#include "HRWrap.h"

#include <winrt/base.h>

namespace Common
{
std::string GetHResultMessage(HRESULT hr)
{
auto err = winrt::hresult_error(hr);
return winrt::to_string(err.message());
}
std::string GetHResultMessage(const winrt::hresult& hr)
{
return GetHResultMessage(hr.value);
}
} // namespace Common
12 changes: 12 additions & 0 deletions Source/Core/Common/HRWrap.h
Expand Up @@ -6,6 +6,7 @@
#include <fmt/format.h>
#include <string>
#include <winerror.h>
#include <winrt/base.h>

#include "Common/CommonTypes.h"

Expand Down Expand Up @@ -33,3 +34,14 @@ struct fmt::formatter<Common::HRWrap>
static_cast<u32>(hr.m_hr));
}
};

template <>
struct fmt::formatter<winrt::hresult>
{
constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const winrt::hresult& hr, FormatContext& ctx) const
{
return fmt::format_to(ctx.out(), "{} ({:#010x})", Common::GetHResultMessage(hr), hr.value);
}
};
14 changes: 14 additions & 0 deletions Source/Core/Common/Swap.h
Expand Up @@ -16,6 +16,8 @@
#include <endian.h>
#endif

#include <fmt/format.h>

#include "Common/CommonTypes.h"

namespace Common
Expand Down Expand Up @@ -183,3 +185,15 @@ struct BigEndianValue
value_type raw;
};
} // Namespace Common

template <typename value_type>
struct fmt::formatter<Common::BigEndianValue<value_type>>
{
fmt::formatter<value_type> m_formatter;
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
template <typename FormatContext>
auto format(const Common::BigEndianValue<value_type>& value, FormatContext& ctx) const
{
return m_formatter.format(value.operator value_type(), ctx);
}
};
Expand Up @@ -23,6 +23,7 @@

#include <fmt/format.h>

#include "Common/HRWrap.h"
#include "Common/Logging/Log.h"
#include "Common/StringUtil.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
Expand Down Expand Up @@ -506,7 +507,7 @@ class Device : public Core::Device
catch (winrt::hresult_error error)
{
ERROR_LOG_FMT(CONTROLLERINTERFACE,
"WGInput: IRawGameController::GetCurrentReading failed: {:x}", error.code());
"WGInput: IRawGameController::GetCurrentReading failed: {}", error.code());
}

// IGamepad:
Expand All @@ -518,7 +519,7 @@ class Device : public Core::Device
}
catch (winrt::hresult_error error)
{
ERROR_LOG_FMT(CONTROLLERINTERFACE, "WGInput: IGamepad::GetCurrentReading failed: {:x}",
ERROR_LOG_FMT(CONTROLLERINTERFACE, "WGInput: IGamepad::GetCurrentReading failed: {}",
error.code());
}
}
Expand Down
Expand Up @@ -4,7 +4,8 @@
#include "VideoCommon/Assets/DirectFilesystemAssetLibrary.h"

#include <algorithm>
#include <fmt/os.h>

#include <fmt/std.h>

#include "Common/FileUtil.h"
#include "Common/Logging/Log.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/BPMemory.h
Expand Up @@ -1863,7 +1863,7 @@ enum class ColorChannel : u32
template <>
struct fmt::formatter<ColorChannel> : EnumFormatter<ColorChannel::Alpha>
{
formatter() : EnumFormatter({"Red", "Green", "Blue", "Alpha"}) {}
constexpr formatter() : EnumFormatter({"Red", "Green", "Blue", "Alpha"}) {}
};

enum class KonstSel : u32
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/TextureCacheBase.h
Expand Up @@ -98,7 +98,6 @@ struct EFBCopyParams
template <>
struct fmt::formatter<EFBCopyParams>
{
std::shared_ptr<int> state;
constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const EFBCopyParams& uid, FormatContext& ctx) const
Expand Down