Skip to content

Instantly share code, notes, and snippets.

@grrussel
grrussel / patch.diff
Created Jul 2, 2017
Touch Event Support for Simple2D
View patch.diff
diff --git a/README.md b/README.md
index 2f09eed..f5412d7 100644
--- a/README.md
+++ b/README.md
@@ -596,6 +596,43 @@ S2D_ShowCursor(true);
S2D_ShowCursor(false);
```
+### Touch Displays
+
@grrussel
grrussel / patch.diff
Created Dec 30, 2016
Simple DrawTriangles for Simple2D
View patch.diff
From bc7c14df1c80e30307657e061c91b497309ddc17 Mon Sep 17 00:00:00 2001
From: George Russell <grrussel@gmail.com>
Date: Fri, 30 Dec 2016 12:45:59 +0100
Subject: [PATCH] Draw Triangles
---
include/simple2d.h | 9 +++++++++
src/gl.c | 16 ++++++++++++++++
src/gl3.c | 14 ++++++++++++++
@grrussel
grrussel / patch.diff
Created Jul 26, 2016
Multiple joystick / controllers for SImple2D
View patch.diff
From ddcb39e799fa19a904f3ed96b196d94957ba28ce Mon Sep 17 00:00:00 2001
From: George Russell <grrussel@gmail.com>
Date: Mon, 25 Jul 2016 19:03:36 +0200
Subject: [PATCH] Remove helper message (+1 squashed commit) Squashed commits:
[374c548] Fix the fix! (+1 squashed commit) Squashed commits: [edc590a] Fix
for multiple controllers
---
include/simple2d.h | 2 +-
src/simple2d.c | 7 ++-----
@grrussel
grrussel / Flexis JM Badge Board Raspberry PI
Last active Aug 29, 2015
Connecting the Flexis JM Badge Board to Raspberry PI
View Flexis JM Badge Board Raspberry PI
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 15a2:003f Freescale Semiconductor, Inc.
pi@raspberrypi ~ $ sudo mount -t vfat /dev/sda /mnt/badge/
pi@raspberrypi ~ $ ls /mnt/badge/
READY.TXT
@grrussel
grrussel / OSX_build_fix.dff
Created Mar 31, 2014
OpenXCOM OSX 10.9 build fix
View OSX_build_fix.dff
diff --git a/src/Interface/ComboBox.cpp b/src/Interface/ComboBox.cpp
index d90b08d..e6923ef 100644
--- a/src/Interface/ComboBox.cpp
+++ b/src/Interface/ComboBox.cpp
@@ -28,6 +28,9 @@
namespace OpenXcom
{
+ const int ComboBox::LIST_MARGIN;
+ const int ComboBox::MAX_ITEMS ;
@grrussel
grrussel / build_fixes_for_osx10_7.diff
Created May 7, 2013
OpenXCOM 0.9 Build fixes for OSX 10.7
View build_fixes_for_osx10_7.diff
diff --git a/src/Engine/OpenGL.cpp b/src/Engine/OpenGL.cpp
index 50a694e..bc4e8bf 100644
--- a/src/Engine/OpenGL.cpp
+++ b/src/Engine/OpenGL.cpp
@@ -60,7 +60,7 @@ std::string strGLError(GLenum glErr)
#define glGetProcAddress(name) SDL_GL_GetProcAddress(name)
-
+#ifndef __APPLE__
@grrussel
grrussel / gist:3230867
Created Aug 1, 2012
debian packages by size
View gist:3230867
dpkg-query -W -f='${Installed-Size} ${Package}\n' | sort -n
View gist:3092513
Mercurial - using "hg serve" to push changes
I've just discovered Mercurial. It's amazing!!! It's a distributed version control system, similar in its flows to git and others from the bunch so if you're already familiar with the concept you'll have no issues working with it.
One thing however is really amazing: it contains a built-in web user interface! Just while being inside the repository type "hg serve" and browse to http://localhost:8000. And there's more to it. "hg serve" can serve as a real server!
There's one thing worth mentioning. If you'd like to use it for hosting a repository there's one thing you have to add to .hgrc (or Mercurial.ini in case you're working in Windows) to make it work:
[web]
allow_push = *
push_ssl = false
@grrussel
grrussel / trackpad disable
Created Dec 6, 2011
Disable my trackpad in Ubuntu
View trackpad disable
xinput list
xinput set-prop 12 "Device Enabled" 0
https://help.ubuntu.com/community/SynapticsTouchpad
@grrussel
grrussel / gist:1263941
Created Oct 5, 2011
GDB "poor mans loop"
View gist:1263941
// http://agateau.wordpress.com/2008/04/17/gdb-trick-the-poor-man-loop/
(gdb) set $pos=0
(gdb) print array[$pos++]
content of array[0]
(gdb)
content of array[1]
(gdb)
content of array[2]