This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wpr -snapshotconfig heap -name OpenKneeboardApp.exe enable | |
# your own wprp is optional, both are logged | |
wpr -start heapsnapshot -start .\OpenKneeboard.wprp -filemode | |
wpr -singlesnapshot heap $((get-process OpenKneeboardApp).id) | |
# Wait for leak, then the same again | |
wpr -singlesnapshot heap $((get-process OpenKneeboardApp).id) | |
wpr -stop c:\users\fred\trace.etl | |
wpr -snapshotconfig heap -name OpenKneeboardApp.exe disable | |
# in wpa, select both snapshots, right click, diff view. Then look at 'added' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct D3D11Timer { | |
D3D11Timer() = default; | |
explicit D3D11Timer(ID3D11Device* device) { | |
device->GetImmediateContext(mContext.put()); | |
D3D11_QUERY_DESC desc {D3D11_QUERY_TIMESTAMP_DISJOINT}; | |
device->CreateQuery(&desc, mDisjointQuery.put()); | |
desc = {D3D11_QUERY_TIMESTAMP}; | |
device->CreateQuery(&desc, mBeginRenderTimestampQuery.put()); | |
device->CreateQuery(&desc, mEndRenderTimestampQuery.put()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.CommandLine; | |
using System.Runtime.CompilerServices; | |
using WixSharp; | |
using WixToolset.Dtf.WindowsInstaller; | |
using File = WixSharp.File; | |
[assembly: InternalsVisibleTo(assemblyName: "XRFrameTools_Installer.aot")] // assembly name + '.aot suffix | |
void CreateMSI(DirectoryInfo sourceRoot) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fred Emmott <fred@fredemmott.com> | |
// SPDX-License-Identifier: MIT | |
#pragma once | |
// Usage: | |
// | |
// constexpr GUID TestGuid = "9add179d-b650-4eca-b471-88ab38c2bd46"_guid; | |
// constexpr GUID TestGuid2 = "{2f896df5-d701-42ea-ab02-cbd50af16516}"_guid; | |
namespace detail::compile_time_guid { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/injectables/OpenXRKneeboard.cpp b/src/injectables/OpenXRKneeboard.cpp | |
index 0c3f6d51..5cdbb322 100644 | |
--- a/src/injectables/OpenXRKneeboard.cpp | |
+++ b/src/injectables/OpenXRKneeboard.cpp | |
@@ -50,6 +50,9 @@ | |
#include <openxr/openxr_platform.h> | |
#include <openxr/openxr_reflection.h> | |
+// From OpenXR v1.1 SDK for XrPosef_Multiply | |
+#include "xr_linear.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fred Emmott <fred@fredemmott.com> | |
// SPDX-License-Identifier: MIT | |
#include <Windows.h> | |
#include <d3d11.h> | |
#include <dxgi1_3.h> | |
#include <imgui.h> | |
#include <imgui_impl_dx11.h> | |
#include <imgui_impl_win32.h> | |
#include <wil/com.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fred Emmott <fred@fredemmott.com> | |
// SPDX-License-Identifier: ISC | |
#include <algorithm> | |
#include <concepts> | |
#include <functional> | |
#include <ranges> | |
#include <string> | |
#include <print> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.clang-format b/.clang-format | |
index 63d4edf..1cd1c88 100644 | |
--- a/.clang-format | |
+++ b/.clang-format | |
@@ -23,7 +23,10 @@ IncludeCategories: | |
- Regex: '^<Windows\.h>$' | |
Priority: 30 | |
- Regex: '^<Unknwn\.h>' | |
- Priority: 31 | |
+ Priority: 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <size_t... I> | |
struct drop_last_impl_t { | |
drop_last_impl_t() = delete; | |
constexpr drop_last_impl_t(std::index_sequence<I...>) { | |
} | |
template <template <class...> class T, class... TArgs> | |
using next_t = T<std::tuple_element_t<I, std::tuple<TArgs...>>...>; | |
template <class TIn> |
NewerOlder