Skip to content

Instantly share code, notes, and snippets.

@DennyLindberg
DennyLindberg / sdl3_win32_wmpointer.cpp
Created November 16, 2024 10:08
Grabbing WM_POINTER events with SDL3 on Windows
// This code does not work as-is. It is a work-in-progress in my application. You need to modify it for your application.
void handle_stylus_event(UINT uMsg, WPARAM wParam)
{
// Wacom + [DriverSetting: Use Windows Ink] required for these events to happen at all.
// WinTab mandatory when Windows Ink is disabled in any way.
if (uMsg == WM_POINTERDEVICECHANGE)
{
PRINT_INPUT("DEVICE CHANGE\n");
@DennyLindberg
DennyLindberg / make_simple.bat
Last active August 18, 2024 01:26
A much simpler version of make.bat
::::
:: A simplified version of the pseudo-make for building a C application using MSVC.
:: Refer to the other gist for details.
:: https://gist.github.com/DennyLindberg/8c0a5e7471a30e6868a00757e8483b78
::::
@echo off
:::: PROJECT CONFIGURATION
set exe_file=main.exe
@DennyLindberg
DennyLindberg / make.bat
Last active August 18, 2024 02:22
A pseudo-make for building a C application using MSVC
::::
:: A pseudo-make for building a C application using MSVC.
:: https://github.com/DennyLindberg
::
:: Use any text editor and commandline. RemedyBG or RAD Debugger for debugging.
:: https://remedybg.itch.io/remedybg
:: https://github.com/EpicGamesExt/raddebugger
::
:: Example:
:: ./make build run arg1 arg2 arg3
@DennyLindberg
DennyLindberg / ublock_filter_twitter.txt
Created December 4, 2019 22:05
Removes clutter on twitter
! Remove liked tweets
twitter.com##article:has(a[href^="/i/user/"]:has-text(/liked$/)):nth-ancestor(2)
! Remove retweet
twitter.com##article:has(a[href^="/i/user/"]:has-text(/Retweeted$/)):nth-ancestor(2)
! Remove sidebar with unnecessary recommendations
twitter.com##div[data-testid="sidebarColumn"]