Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#ifdef EMSCRIPTEN
#include <emscripten/emscripten.h>
// bug - SDL_GetKeyboardState doesn't return scancodes, it returns keycodes, so acts exactly like
// SDL_GetKeyState instead
#define SDL_GetKeyState SDL_GetKeyboardState
#endif
@ToadKing
ToadKing / gist:6049763
Last active December 20, 2015 01:29
glGetAttachedShaders test
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#include <stdio.h>
#include <stdlib.h>
static void die(const char *msg)
{
printf("%s\n", msg);
abort();
}
@ToadKing
ToadKing / gist:6206545
Created August 11, 2013 19:39
sdl event testcase
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#include <emscripten.h>
// bug - SDL_GetKeyboardState doesn't return scancodes, it returns keycodes, so acts exactly like
// SDL_GetKeyState instead
#define SDL_GetKeyState SDL_GetKeyboardState
int result = 0;
diff --git a/src/library_openal.js b/src/library_openal.js
index 7f5d5df..9477694 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -7,11 +7,18 @@ var LibraryOpenAL = {
currentContext: null,
QUEUE_INTERVAL: 25,
QUEUE_LOOKAHEAD: 100,
+
+ updateStartTime: function(context) {
import urllib2
from base64 import b64encode
import os
import sys
###Change these to change what game to download for
gamecode = 'RSBE'
gamecode2 = 'RVL-RSBJ'
svc = '9001'
password = 'LeNKXTpZy9Y48swJ'
/home/michael/emscripten/emcc -DSINC_LOWER_QUALITY -DHAVE_SHARED_CONTEXT -DSINGLE_THREAD -DNO_ASM -DNOSSE -DCC_resampler=mupen_CC_resampler -Dsinc_resampler=mupen_sinc_resampler -Drglgen_symbol_map=mupen_rglgen_symbol_map -Dmain_exit=mupen_main_exit -Dadler32=mupen_adler32 -Drarch_resampler_realloc=mupen_rarch_resampler_realloc -Daudio_convert_s16_to_float_C=mupen_audio_convert_s16_to_float_C -Daudio_convert_float_to_s16_C=mupen_audio_convert_float_to_s16_C -Daudio_convert_init_simd=mupen_audio_convert_init_simd -Drglgen_resolve_symbols_custom=mupen_rglgen_resolve_symbols_custom -Drglgen_resolve_symbols=mupen_rglgen_resolve_symbols -DSDL_VIDEO_OPENGL_ES2=1 -DSINC_LOWER_QUALITY -DHAVE_SHARED_CONTEXT -DSINGLE_THREAD -Iglide2gl/src/Glitch64/inc -DHAVE_OPENGLES2 -DDISABLE_3POINT -D__LIBRETRO__ -DINLINE="inline" -DM64P_PLUGIN_API -Imupen64plus-core/src -Imupen64plus-core/src/api -Ilibretro/libco -Ilibretro -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -O2 -DNDEBUG -c -o glide2gl/src/Glitch64/textures.o glide2gl/src
Error: WebGL: enable: invalid enum value 0xde1 retroarch.js:1
Error: WebGL: texImage2D: no texture is bound to target TEXTURE_2D retroarch.js:1
Error: WebGL: texParameter: no texture is bound to this target retroarch.js:1
Error: WebGL: enable: invalid enum value 0xde1 retroarch.js:1
Error: WebGL: linkProgram: a fragment shader used in this program failed to compile, with this log:
ERROR: 0:30: 'gl_FragDepth' : undeclared identifier
retroarch.js:1
Error: WebGL: useProgram: program was not linked successfully retroarch.js:1
Error: WebGL: vertexAttribPointer: must have valid GL_ARRAY_BUFFER binding retroarch.js:1
diff --git a/glide2gl/src/Glitch64/geometry.c b/glide2gl/src/Glitch64/geometry.c
index 73eea75..754e7af 100644
--- a/glide2gl/src/Glitch64/geometry.c
+++ b/glide2gl/src/Glitch64/geometry.c
@@ -28,7 +28,7 @@
#include "main.h"
#include "../Glide64/rdp.h"
-struct draw_buffer {
+/*struct draw_buffer {
@ToadKing
ToadKing / gist:3b452a4121fede44a50f
Last active June 3, 2022 06:34
Wii U GC adapter - Working prototype
@ToadKing
ToadKing / gist:a5edb237cb3e4433c3f3
Created December 18, 2014 05:52
Wii U adapter emulator
// Super messy and adapted almost exclusively from libusb-gadget loopback example
/*
* Copyright (C) 2009 Daiki Ueno <ueno@unixuser.org>
* This file is part of libusb-gadget.
*
* libusb-gadget is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.