Skip to content

Instantly share code, notes, and snippets.

View Cheeseness's full-sized avatar

Cheeseness Cheeseness

View GitHub Profile
@Cheeseness
Cheeseness / sfml_patch.diff
Last active May 3, 2019 16:33
SFML 2.5.0 patch against https://github.com/SFML/SFML/blob/2.5.0/src/SFML/Window/Unix/WindowImplX11.cpp for nicer borderless fullscreen windows
diff --git a/SFML-2.5.0/src/SFML/Window/Unix/WindowImplX11.cpp b/SFML-2.5.0/src/SFML/Window/Unix/WindowImplX11.cpp
index e2c8d29..a4dcd8e 100644
--- a/SFML-2.5.0/src/SFML/Window/Unix/WindowImplX11.cpp
+++ b/SFML-2.5.0/src/SFML/Window/Unix/WindowImplX11.cpp
@@ -641,7 +641,10 @@ m_lastInputTime (0)
hints.decorations |= MWM_DECOR_BORDER | MWM_DECOR_TITLE | MWM_DECOR_MINIMIZE | MWM_DECOR_MENU;
hints.functions |= MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE;
}
- if (style & Style::Resize)
+
@Cheeseness
Cheeseness / mousewarp.sh
Last active December 17, 2017 06:16
Quick and dirty mousewarp script to keep mouse cursor within Everspace's window
#!/bin/bash
# Quick and dirty mousewarp script to keep mouse cursor within Everspace's 1440x900 window on my second monitor
while true
do
IFS=","
arr=($(xdotool getmouselocation | awk '{ print substr($2,3,length($2)) "," substr($1,3,length($1)) }'))
warp=0
if [ ${arr[1]} -lt 2160 ]
@Cheeseness
Cheeseness / gist:8a49668d0a43278b72b2
Last active May 4, 2023 23:48
C++ SDL Fullscreen Toggle
/*
* A function for toggling windowed mode in a C++ SDL app. Fullscreen windows will appear on whichever screen the window was on.
*
* Could be used in conjunction with SDL_GetDisplayName(int displayIndex)
* and SDL_GetNumVideoDisplays(void) to programmatically force fullscreen onto a particular display
*/
void toggleWindowed()
{
//Grab the mouse so that we don't end up with unexpected movement when the dimensions/position of the window changes.
Kernel: Linux 3.19.8-100.fc20.x86_64 x86_64
Distro: Fedora release 20 (Heisenbug)
CPU: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
4 cores/threads
3900.00 MHz
RAM: 15.61 GiB
GPU: GeForce GTX 650 Ti/PCIe/SSE2
OpenGL 4.5.0 NVIDIA 352.63
GLSL 4.50 NVIDIA
Screen: 3840x1080
Name/handle:
7DFPS jams participated in:
Development distro:
1) Please describe your 7DFPS game.
2) What attracted you to 7DFPS?
3) Have you worked on any games previously? If so, what are they, if not, what's inspired you to try?
@Cheeseness
Cheeseness / gist:d9da9b3218060940e1d5
Created October 1, 2014 07:27
Rift DK2 xrandr output
HDMI-0 connected 1080x1920+3840+0 (normal left inverted right x axis y axis) 71mm x 126mm
1080x1920 75.00*+ 72.00 60.00
1080x948 119.99
Hi, and thank you for your interest in my upcoming article on Another World
(also known as Out of This World), which will be published at cheesetalks.net
Although the deadline for responses to this questionnaire was the 25th of
February 2016, I have decided to leave it open to anybody who would still like
to share their memories and feelings about the game. Depending upon how far
through the post-research portion of this project I am, late responses may or
may not be included in analyses and interpretations of the data I have
gathered.
@Cheeseness
Cheeseness / voices-1.4.0.diff
Created October 31, 2013 05:45
Another attachment to NeverTrac ticket #85 ( [Neverball GitHub issue #15](https://github.com/Neverball/neverball/issues/15) ) by @mehdiym
diff -aur neverball-1.4.0/ball/main.c neverball-1.4.0-mod/ball/main.c
--- neverball-1.4.0/ball/main.c 2004-09-08 23:14:17.000000000 +0300
+++ neverball-1.4.0-mod/ball/main.c 2007-05-09 19:48:53.000000000 +0300
@@ -233,6 +233,9 @@
audio_init();
+ if (config_get_d(CONFIG_VOICE) == 0)
+ audio_mute_channel(1, 1);
+
@Cheeseness
Cheeseness / voices.diff
Created October 31, 2013 05:44
An attachment to NeverTrac ticket #85 ( [Neverball GitHub issue #15](https://github.com/Neverball/neverball/issues/15) ) by @mehdiym
Index: share/config.c
===================================================================
--- share/config.c (revision 902)
+++ share/config.c (working copy)
@@ -83,6 +83,7 @@
config_set_d(CONFIG_FPS, DEFAULT_FPS);
config_set_d(CONFIG_SOUND_VOLUME, DEFAULT_SOUND_VOLUME);
config_set_d(CONFIG_MUSIC_VOLUME, DEFAULT_MUSIC_VOLUME);
+ config_set_d(CONFIG_VOICE, DEFAULT_VOICE);
config_set_d(CONFIG_JOYSTICK, DEFAULT_JOYSTICK);
@Cheeseness
Cheeseness / game.sh
Created August 26, 2013 06:34
Linux 32/64bit detection launcher script for intel/AMD architectures. Rename game_64 and game_32 to the 64 and 32 bit binaries for your application. Uncomment LD_LIBRARY_PATH lines if you distribute libs. Inspired by the launcher @flibitijibibo distributes with his games ^_^
#!/bin/bash
# Change to the directory that the script and binaries are in
cd "`dirname "$0"`"
# uname provides some system information. -m is the machine hardware name and returns x86_64 for 64 bit kernels.
if [ $(uname -m) == "x86_64" ]; then
# Print some output to let the user know what's going on
echo "Running 64 bit"