Skip to content

Instantly share code, notes, and snippets.

View intervigilium's full-sized avatar

Ethan Chen intervigilium

View GitHub Profile
firmware: firmware {
android {
compatible = "android,firmware";
veritymode = "eio";
};
};

Keybase proof

I hereby claim:

  • I am intervigilium on github.
  • I am intervigil (https://keybase.io/intervigil) on keybase.
  • I have a public key whose fingerprint is 08D1 75A2 5667 F1B6 C77F BFF8 0BA5 994E C255 E1D6

To claim this, I am signing this object:

@intervigilium
intervigilium / setpixelformat.patch
Last active December 11, 2015 05:39
Napoleon: Total War SetPixelFormat patch for Wine 1.5
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 3a6a2c7..86d182a 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1642,7 +1642,7 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM
TRACE("(%p,%d,%p)\n", hdc, iPixelFormat, ppfd);
- if (!hwnd || hwnd == GetDesktopWindow())
+ if (!hwnd)
@intervigilium
intervigilium / AndroidManifest.xml
Created September 23, 2010 06:24
setting rotation config changes in AndroidManifest.xml
<activity android:name=".Mic"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation" >
@intervigilium
intervigilium / ConvertView.java
Created September 23, 2010 06:21
Using convertView in Android ListView
View view = convertView;
if (view == null) {
LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = vi.inflate(R.layout.list_row, parent, false);
}
@intervigilium
intervigilium / AudioDetect.java
Created September 23, 2010 06:02
Android audio format autodetection code
do {
switch (sampleRate) {
case -1:
sampleRate = Constants.SAMPLE_RATE_22KHZ;
break;
case Constants.SAMPLE_RATE_44KHZ:
sampleRate = Constants.SAMPLE_RATE_22KHZ;
break;
case Constants.SAMPLE_RATE_22KHZ:
sampleRate = Constants.SAMPLE_RATE_11KHZ;
@intervigilium
intervigilium / Android.mk
Created September 23, 2010 05:58
talentedhack Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/fftw3/api/sources.mk
include $(LOCAL_PATH)/fftw3/dft/sources.mk
include $(LOCAL_PATH)/fftw3/dft/scalar/sources.mk
include $(LOCAL_PATH)/fftw3/dft/scalar/codelets/sources.mk
include $(LOCAL_PATH)/fftw3/kernel/sources.mk
include $(LOCAL_PATH)/fftw3/rdft/sources.mk
include $(LOCAL_PATH)/fftw3/rdft/scalar/sources.mk
@intervigilium
intervigilium / gist:593195
Created September 23, 2010 05:54
ViewNotAttachedStackTrace
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)
at android.view.Window$LocalWindowManager.removeView(Window.java:432)
at android.app.Dialog.dismissDialog(Dialog.java:278)
at android.app.Dialog.access$000(Dialog.java:71)
at android.app.Dialog$1.run(Dialog.java:111)
at android.app.Dialog.dismiss(Dialog.java:268)