Skip to content

Instantly share code, notes, and snippets.

View ananace's full-sized avatar

Alexander "Ananace" Olofsson ananace

  • Linköping University
  • Sweden
View GitHub Profile
@ananace
ananace / 6.20-joyaxis-lite.patch
Created October 23, 2021 12:24
Simpler joyaxis patch for Wine 6.20
diff --git a/dlls/winejoystick.drv/joystick_linux.c b/dlls/winejoystick.drv/joystick_linux.c
index 8d1a7b1a25a..4057ec52a1e 100644
--- a/dlls/winejoystick.drv/joystick_linux.c
+++ b/dlls/winejoystick.drv/joystick_linux.c
@@ -260,9 +260,9 @@ LRESULT driver_joyGetDevCaps(DWORD_PTR dwDevID, LPJOYCAPSW lpCaps, DWORD dwSize)
lpCaps->wUmax = 0xFFFF;
lpCaps->wVmin = 0;
lpCaps->wVmax = 0xFFFF;
- lpCaps->wMaxAxes = 6; /* same as MS Joystick Driver */
+ lpCaps->wMaxAxes = 16; /* same as MS Joystick Driver */
@ananace
ananace / joyaxis-6.18.patch
Last active September 25, 2021 07:39
Quick hack to get the expanded joyaxises patch to apply on Wine 6.18
diff --git a/dlls/joy.cpl/joy.h b/dlls/joy.cpl/joy.h
index 64df21963b9..c05880d88ba 100644
--- a/dlls/joy.cpl/joy.h
+++ b/dlls/joy.cpl/joy.h
@@ -49,8 +49,8 @@ struct Joystick {
struct Effect *effects;
};
-#define TEST_MAX_BUTTONS 32
-#define TEST_MAX_AXES 4
@ananace
ananace / user_settings.py
Created August 22, 2018 15:56
Example configuration for Steam Proton user settings
#!/usr/bin/env python3
import os
user_settings = {
#logs are saved to $HOME/steam-$STEAM_APP_ID.log, overwriting any previous log with that name
# "WINEDEBUG": "+timestamp,+pid,+tid,+seh,+debugstr,+module",
# "DXVK_LOG_LEVEL": "info",
@ananace
ananace / 99-better-pa.patch
Created March 22, 2018 17:54
PA patch for qemu 2.11
diff --git a/audio/audio.c b/audio/audio.c
index beafed209b..6f42a019b0 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -2066,3 +2066,8 @@ void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
}
}
}
+
+int64_t audio_get_timer_ticks(void)
@ananace
ananace / README.md
Last active January 28, 2018 19:53
Puppet SSL certs example for Kubernetes

Kubernetes API cert with Puppet CA

Usage

  • Create the folder /etc/puppetlabs/puppet/ssl/manual_ca
  • Add the contents of the gist into there
  • Run kubernetes-cert.sh
  • Deploy the generated cert and private key onto your K8s master.
@ananace
ananace / PackingExample.cpp
Last active May 6, 2018 05:41
Message packing example for libyojimbo, with built-in compression.
#include <yojimbo.h>
#include <miniz.h>
class PackedMessage : public yojimbo::BlockMessage
{
public:
enum { MsgType = 0x00 };
template <typename Stream>
bool Serialize(Stream& stream)
@ananace
ananace / Event.hpp
Created April 26, 2016 23:42
Simple C#-like event handling in C++11
#pragma once
#include <functional>
#include <vector>
template<typename... Args>
class Event
{
public:
typedef std::function<void(Args...)> EventHook;
@ananace
ananace / gist:de7f30454e99b3952405
Last active July 12, 2023 05:57
OpenMW Windows Development Environment Setup - Appveyor scripts

NB; (An updated version of this guide can be found on the wiki)

OpenMW Windows Dev-Env

What you need?

  • Visual Studio 2013 or 2015 (Community edition is enough)
  • MSYSGit or Git for Windows as it's also called (cinst git.install if you have Chocolatey)
@ananace
ananace / Script Interface.md
Last active August 29, 2015 14:10
LD31 Script Interface

LD31 Script interface documentation

Global properties

Colors:

Color Colors::Black const

Color Colors::Blue const

#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
// Node struct
struct Node {
int data;
Node *next;
};