Skip to content

Instantly share code, notes, and snippets.

View ahmed605's full-sized avatar
🔬
RE'ing stuff

Ahmed Walid ahmed605

🔬
RE'ing stuff
View GitHub Profile
//
// XWine1
//
// This code is licensed under MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
private unsafe void WalkDxgiAdapters()
{
using ComPtr<IDXGIFactory2> dxgiFactory = default;
using ComPtr<IDXGIAdapter> dxgiAdapter = default;
HRESULT hr = DirectX.CreateDXGIFactory2(0x0, __uuidof<IDXGIFactory2>(), (void**)dxgiFactory.GetAddressOf());
if (hr >= S.S_OK)
{
D3D_FEATURE_LEVEL[] d3dFeatureLevels = new D3D_FEATURE_LEVEL[] { D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_9_3 };
@ahmed605
ahmed605 / CompositionExpressions.md
Last active November 8, 2024 14:26
Composition Expression Language

Composition Expression Language

Important

Composition Expression Language is case-insensitive.

Note

Only functions/operators not in the Microsoft Learn doc have their full signature mentioned here, others are just listed by their name

This gist documents the primitive types, subchannels, keywords, operators, functions, member functions, and animatable properties of the Composition Expression Language used for Composition Expression Animations since the Microsoft Learn documentation is outdated.

@ahmed605
ahmed605 / main.cpp
Created March 22, 2022 10:44 — forked from ADeltaX/main.cpp
DWM Thumbnail/VirtualDesktop USING Windows.UI.Composition
#include <Unknwn.h>
#include <Windows.h>
#include <wrl\implements.h>
#include <comutil.h>
#include <dcomp.h>
#include <dwmapi.h>
#include <dxgi1_3.h>
#include <d3d11_2.h>
#include <d2d1_2.h>
#include <d2d1_2helper.h>

Decompiling

  1. Clone MCPConfig from the GitHub repository.
  2. In the root project directory, run gradlew :1.13:projectClientApplyPatches if you want to make a client side mod, or gradlew :1.13:projectServerApplyPatches if you want to make a server side mod.
  3. Naviage into versions/1.13/projects/server (or client). There are a couple of fixes necessary to get the code to compile:
    1. There is a missing class mcp.MethodsReturnNonnullByDefault which you will have to manually add. A copy can be found here.
    2. If you're making a server-only mod, the anonymous classes in net.minecraft.item.ItemClock and net.minecraft.item.ItemCompass need to be modified to override the method in net.minecraft.item.IItemPropertyGetter. This is never actually called on the server so you can make a dummy implementation.
  4. Copy versions/1.13/projects/server (or client) into a separate