Skip to content

Instantly share code, notes, and snippets.

View sulix's full-sized avatar

David Gow sulix

View GitHub Profile
@sulix
sulix / cdda.c
Created December 4, 2024 13:02
CDDA Playback via Digital-Audio-Extraction on Linux w/SDL3
// Super-hacky CD player with SDL3 and the CDROMREADAUDIO ioctl.
#include <linux/cdrom.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#include <sys/ioctl.h>
@sulix
sulix / steam-813780proton8-builtin-ucrtbase.log
Created April 20, 2023 14:25
Proton 8.0-1 crash logs for Age of Empires II DE (871980, Build ID 10944061)
This file has been truncated, but you can view the full file.
======================
Proton: 1681827505 proton-8.0-1d
SteamGameId: 813780
Command: ['/home/david/.local/share/Steam/steamapps/common/AoE2DE/AoE2DE_s.exe']
Options: {'noopwr', 'forcelgadd'}
depot: 0.20230314.45253
pressure-vessel: 0.20230314.0 scout
scripts: 0.20230314.0
sniper: 0.20230314.45253 sniper 0.20230314.45253
Kernel: Linux 6.2.10-1-default #1 SMP PREEMPT_DYNAMIC Thu Apr 6 10:36:55 UTC 2023 (ba7816e) x86_64
@sulix
sulix / babobba-sysinfo.txt
Created July 29, 2022 13:04
babobba-sysinfo.txt
Ordinateur
Fabricant : Valve
Modèle : Jupiter
Type : ordinateur portable
Aucun écran tactile détecté
Processeur
Fabricant du CPU : AuthenticAMD
Marque du processeur : AMD Custom APU 0405
Famille du processeur : 0x17
@sulix
sulix / sparky-steam-sysinfo.txt
Last active February 25, 2024 13:38
sparky-steam-sysinfo.txt
['sparky' system info as of 2024-02-25. See gist history to match version against bug report]
Computer Information:
Manufacturer: Gigabyte Technology Co., Ltd.
Model: Z87X-UD5H-CF
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
@sulix
sulix / glx_wrapper.c
Last active April 25, 2022 08:01
A hacky implementation of just the bits of GLX that Cg requires on top of SDL2, so you can run Cg-using games under Wayland
// A hacky implementation of just the bits of GLX that Cg requires on top of SDL2
//
// All blame should go to David Gow <david@davidgow.net>
//
// Build it with:
// cc -g -o libglx_wrapper.so glx_wrapper.c `sdl2-config --cflags --libs` -fpic --shared
// cc -g -m32 -o libglx_wrapper32.so glx_wrapper.c `/usr/lib/baselibs-32bit/bin/sdl2-config --cflags --libs` -fpic --shared
//
// Then run your game with:
// SDL_VIDEODRIVER=wayland SDL_DYNAMIC_API=path-to/libSDL2-2.0.so.0 LD_PRELOAD=libglx_wrapper.so
@sulix
sulix / civctp_wrapper.c
Created March 21, 2022 14:22
Loki CivCTP function wrapper
// Step 1: Hex-Edit the civctp.dynamic executable
// - Rename the libSDL import to point to SDL 1.2
// - Rename all the functions below in the import tables:
// - __builtin_new → x_builtin_new (etc.)
// - {mem,str,strn}cpy → {mem,str,strn}cpx
// - Make sure you have libttf and libsmpeg in the current directory
// - Build this with:
// cc -shared -m32 -fPIC -o libcivctp_wrapper.so civctp_wrapper.c
// - Run CivCTP with:
// LD_PRELOAD=libcivctp_wrapper.so LD_LIBRARY_PATH=. ./civctp.dynamic

Keybase proof

I hereby claim:

  • I am sulix on github.
  • I am sulix (https://keybase.io/sulix) on keybase.
  • I have a public key whose fingerprint is 504F FEFC 668F B083 002B 2D3B BE88 5DD4 C280 C594

To claim this, I am signing this object: