Skip to content

Instantly share code, notes, and snippets.

View jchv's full-sized avatar

jchv

  • United States
View GitHub Profile
@jchv
jchv / nix-code-wine.sh
Last active September 18, 2020 07:08
Script for getting a good IDE experience for programming Wine under NixOS. Assumes you are in the Wine folder, and have a ../wine-build.
#!/bin/sh
set -e
if [ "$1" = "inside-nix-shell" ]; then
echo "Clearing clangd cache."
rm -f "compile_commands.json"
rm -rf ".clangd"
LIBEAR32="$(nix-build "<nixpkgs>" -A bear --argstr system i686-linux)/lib/bear/libear.so"
LIBEAR64="$(nix-build "<nixpkgs>" -A bear --argstr system x86_64-linux)/lib/bear/libear.so"
@jchv
jchv / input-settings-fixes.diff
Created November 7, 2020 20:25
Fix for some bsnes input settings bugs (being tested.)
diff --git a/bsnes/target-bsnes/settings/input.cpp b/bsnes/target-bsnes/settings/input.cpp
index 13b04b7a..fd76ac78 100644
--- a/bsnes/target-bsnes/settings/input.cpp
+++ b/bsnes/target-bsnes/settings/input.cpp
@@ -68,12 +68,11 @@ auto InputSettings::updateControls() -> void {
assignMouse3.setVisible(false);
if(activeMapping) {
- auto& input = activeDevice().mappings[batched.left().offset()];
- if(input.isDigital()) {