Skip to content

Instantly share code, notes, and snippets.

@Bigpet
Bigpet / dsound.patch
Created November 4, 2013 15:04
diff file for DirectSound default behavior change.
diff --git a/Windows/DSoundStream.cpp b/Windows/DSoundStream.cpp
index 3e09432..575aeb8 100644
--- a/Windows/DSoundStream.cpp
+++ b/Windows/DSoundStream.cpp
@@ -135,11 +135,10 @@ namespace DSound
{
int numBytesRendered = 4 * (*callback)(realtimeBuffer, numBytesToRender >> 2, 16, 44100, 2);
- if (numBytesRendered != 0)
- writeDataToBuffer(lastPos, (char *)realtimeBuffer, numBytesRendered);
# vim:noexpandtab:
cmake_minimum_required(VERSION 2.8.8)
project(PPSSPP)
if(ANDROID)
if(ARMEABI OR ARMEABI_V7A)
set(ARM ON)
set(USE_FFMPEG ON)
endif()
endif()
@Bigpet
Bigpet / Dota.fgd
Created January 18, 2014 20:44
from SFM
//-------------------------------------------------------------------------
//
// Game data for DOTA!
//
//-------------------------------------------------------------------------
@include "halflife2.fgd"
@gridnav(64, 32, 32, 3500)
//previous non-STL version:
u32 vfsDevice::CmpLocalPath(const wxString& local_path)
{
wxFileName path0(m_local_path);
path0.Normalize();
const wxString full_local_path = path0.GetFullPath();
if (local_path.Len() < full_local_path.Len())
return 0;
@Bigpet
Bigpet / ps3_loop_tlou
Created March 2, 2014 17:44
a small loop that I encountered that rpcs3 can't seem to escape
jmp_loc0:
5058297d subf r9,r9,r11 ; start here
0c00a938 addi r5,r9,12
0028887f cmpw cr7,r8,r5
5040e57c subf r7,r5,r8
3f00072f cmpwi cr6,r7,63
ec019c41 blt cr7,jmp_loc20 ; jump taken everytime
....
....
@Bigpet
Bigpet / deploy.yml
Created March 10, 2014 10:04
simple ansible yml
---
- hosts: testservers
user: bradmin
sudo: yes
tasks:
- name: ensure apache is runing
service: name=https state=running
adde ([00],[00]) -> 0000000000000001 | adde ([00],[00]) -> 0000000000000000
adde ([00],[01]) -> 0000000000000002 | adde ([00],[01]) -> 0000000000000001
adde ([00],[02]) -> 0000000000000003 | adde ([00],[02]) -> 0000000000000002
adde ([00],[03]) -> 0000000000000004 | adde ([00],[03]) -> 0000000000000003
adde ([00],[04]) -> 0000000000000005 | adde ([00],[04]) -> 0000000000000004
adde ([00],[05]) -> 0000000000000000 | adde ([00],[05]) -> ffffffffffffffff
adde ([00],[06]) -> ffffffffffffffff | adde ([00],[06]) -> fffffffffffffffe
adde ([00],[07]) -> fffffffffffffffe | adde ([00],[07]) -> fffffffffffffffd
adde ([00],[08]) -> fffffffffffffffd | adde ([00],[08]) -> fffffffffffffffc
adde ([00],[09]) -> 0003333300330034 | adde ([00],[09]) -> 0003333300330033
adde ([00],[00]) -> 0000000000000001 | adde ([00],[00]) -> 0000000000000000
adde ([00],[01]) -> 0000000000000002 | adde ([00],[01]) -> 0000000000000001
adde ([00],[02]) -> 0000000000000003 | adde ([00],[02]) -> 0000000000000002
adde ([00],[03]) -> 0000000000000004 | adde ([00],[03]) -> 0000000000000003
adde ([00],[04]) -> 0000000000000005 | adde ([00],[04]) -> 0000000000000004
adde ([00],[05]) -> 0000000000000000 | adde ([00],[05]) -> ffffffffffffffff
adde ([00],[06]) -> ffffffffffffffff | adde ([00],[06]) -> fffffffffffffffe
adde ([00],[07]) -> fffffffffffffffe | adde ([00],[07]) -> fffffffffffffffd
adde ([00],[08]) -> fffffffffffffffd | adde ([00],[08]) -> fffffffffffffffc
adde ([00],[09]) -> 0003333300330034 | adde ([00],[09]) -> 0003333300330033
@Bigpet
Bigpet / cflags
Created April 10, 2014 21:07
compiler flags
/usr/bin/clang++
-DGLX_GLXEXT_PROTOTYPES
-DGL_GLEXT_PROTOTYPES
-DWXUSINGDLL
-D_FILE_OFFSET_BITS=64
-D__WXGTK__
-g
-std=c++11
-fsanitize=address
-pthread
test2.cpp:9:10: error: no matching function for call to 'all_of'
cout << all_of(foo.begin(), foo.end(), isdigit);
^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_algo.h:729:5: note:
candidate template ignored: couldn't infer template argument '_Predicate'
all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
^
1 error generated.