Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View yshui's full-sized avatar
🪲

Yuxuan Shui yshui

🪲
View GitHub Profile
// !!!!!!!
// result:
// 07f0:err:seh:_assert ../wine/dlls/ntdll/threadpool.c:2124: Assertion failed "!object->num_running_callbacks"
// wine: Assertion failed at address 00006FFFFFF76228 (thread 07f0), starting debugger...
#include <stdexcept>
#define COBJMACROS
#include <atomic>
#include <initguid.h>
@yshui
yshui / mf.cpp
Last active October 27, 2023 16:10
Media foundation test
#include <condition_variable>
#include <mutex>
#include <stdexcept>
#define COBJMACROS
#include <initguid.h>
#include <sstream>
#include <mfobjects.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mferror.h>
@yshui
yshui / wait_video_sync.c
Last active July 4, 2023 09:02
nvidia glXWaitVideoSync test
// Build with: gcc wait_video_sync.c -lGLX -lX11 -lGLU -lGL
// Source: https://www.khronos.org/opengl/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <GL/glxext.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <stdio.h>
@yshui
yshui / 0000-README.md
Last active April 22, 2022 21:51
Wine VRChat video player support patch

This patches apply on top of wine-7.0, with staging patches applied.

Easiest way to build this is to use something like wine-tkg, and apply this as user patches.

[START][2021-11-05 12:53:06] LSP logging initiated
[INFO][2021-11-05 12:53:07] .../vim/lsp/rpc.lua:258 "Starting RPC client" {
args = {},
cmd = "rust-analyzer",
extra = {}
}
[TRACE][2021-11-05 12:53:07] .../lua/vim/lsp.lua:851 "LSP[rust_analyzer]" "initialize_params" {
capabilities = {
callHierarchy = {
dynamicRegistration = false
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 9 5950X 16-Core Processor
CPU Family: 0x19
#include <GL/glx.h>
#include <X11/X.h>
#include <X11/Xlib-xcb.h>
#include <stddef.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <xcb/xcb.h>
#include <xcb/xfixes.h>
#define auto __auto_type
@yshui
yshui / meson.build
Last active July 8, 2019 13:51
meson cmake bug
project('test', 'cpp')
prometheus_cpp = dependency('prometheus-cpp', method: 'cmake', modules: ['prometheus-cpp::core'], static: false)
@yshui
yshui / glx.c
Created February 3, 2019 14:41
madness
// gcc glx.c -lX11 -lGL
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <stdio.h>
int main() {
Display *dpy = XOpenDisplay(NULL);
int scr = DefaultScreen(dpy);
int ncfg;
GLXFBConfig *fbs = glXGetFBConfigs(dpy, scr, &ncfg);
@yshui
yshui / deduct.cpp
Created September 23, 2018 23:41
C++ template parameter deduction based on return type
struct Fun {
// Gadget used for return type based deduction
// operator T() is probably the only place in C++
// where the template parameter can be deduced from
// what the function should return
template<typename T>
operator T() {
return T(sizeof(T));
}
};