Skip to content

Instantly share code, notes, and snippets.

View andres-asm's full-sized avatar

Andrés andres-asm

View GitHub Profile
diff --git a/libretro/libretro.c b/libretro/libretro.c
index c4b515a..b2d36e7 100644
--- a/libretro/libretro.c
+++ b/libretro/libretro.c
@@ -934,13 +934,14 @@ bool retro_serialize(void *data, size_t size)
if (initializing)
return false;
- const char* filename = ConfigGetSharedDataFilepath("savestate.temp");
- int success = savestates_save_m64p((char*)filename);
Basic idea, when a netplay match is started an http post would be sent to a web server, something like this
http://matchmaking.libretro.com/register?username="blah"?hostname="ipaddress"?port="port"?core="corename"?core_version="version"?gamename="gamename"?crc="crc"
It would send subsequent keepalives every X seconds.
The PHP or perl or whatever script would generate a simple "\n" separated list that can be downloaded, maybe periodically
in the backgroud or maybe on demand. The PHP script would remove an entry after Y minutes or whenever the game changes for the same
IP/Nickname combo
Then a client could go to "Online" or whatever, hit refresh and it would display a list of the available games, hitting
#AUTOMATICALLY GENERATED - DO NO EDIT!
server {
listen *:80;
server_name dev.protrauma.com.ec;
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000000004df950 in dinput_is_pressed (id=49, port=0, binds=0x0,
joypad_info=..., di=0x7ab99e0) at input/drivers/dinput.c:295
295 if (!di->blocked && dinput_keyboard_pressed(di, bind->key))
(gdb) bt full
#0 0x00000000004df950 in dinput_is_pressed (id=49, port=0, binds=0x0,
joypad_info=..., di=0x7ab99e0) at input/drivers/dinput.c:295
bind = 0x6b30
#1 dinput_input_state (data=0x7ab99e0, joypad_info=..., binds=0x538fc40,
port=0, device=1, idx=0, id=49) at input/drivers/dinput.c:481
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000000004dfa60 in dinput_is_pressed (id=49, port=0, binds=0x0,
joypad_info=..., di=0x7acd950) at input/drivers/dinput.c:295
295 if (!di->blocked && dinput_keyboard_pressed(di, bind->key))
(gdb) bt
#0 0x00000000004dfa60 in dinput_is_pressed (id=49, port=0, binds=0x0,
joypad_info=..., di=0x7acd950) at input/drivers/dinput.c:295
#1 dinput_input_state (data=0x7acd950, joypad_info=..., binds=0x538fbc0,
port=0, device=1, idx=0, id=49) at input/drivers/dinput.c:481
#2 0x0000000000428830 in input_menu_keys_pressed (
static void nuk_layout_ps3(nuk_handle_t *xmb, int width)
{
unsigned new_font_size, new_header_height;
settings_t *settings = config_get_ptr();
float scale_factor = (settings->menu.xmb.scale_factor * width) / (1920.0 * 100);
xmb->above_subitem_offset = 1.5;
xmb->above_item_offset = -1.0;
xmb->active_item_factor = 3.0;
This file has been truncated, but you can view the full file.
0 wglChoosePixelFormat(hdc = 0x78015169, ppfd = &{nSize = 40, nVersion = 1, dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL, iPixelType = PFD_TYPE_RGBA, cColorBits = 32, cRedBits = 0, cRedShift = 0, cGreenBits = 0, cGreenShift = 0, cBlueBits = 0, cBlueShift = 0, cAlphaBits = 0, cAlphaShift = 0, cAccumBits = 0, cAccumRedBits = 0, cAccumGreenBits = 0, cAccumBlueBits = 0, cAccumAlphaBits = 0, cDepthBits = 0, cStencilBits = 0, cAuxBuffers = 0, iLayerType = PFD_MAIN_PLANE, bReserved = 0, dwLayerMask = 0, dwVisibleMask = 0, dwDamageMask = 0}) = 9
1 wglSetPixelFormat(hdc = 0x78015169, iPixelFormat = 9, ppfd = &{nSize = 40, nVersion = 1, dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL, iPixelType = PFD_TYPE_RGBA, cColorBits = 32, cRedBits = 0, cRedShift = 0, cGreenBits = 0, cGreenShift = 0, cBlueBits = 0, cBlueShift = 0, cAlphaBits = 0, cAlphaShift = 0, cAccumBits = 0, cAccumRedBits = 0, cAccumGreenBits = 0, cAccumBlueBits = 0, cAccumAlphaBits = 0, cDepthBits = 0, cStencilBit
Continuing.
[Thread 18996.0x2f40 exited with code 0]
Thread 1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 18996.0x4414]
0x000000000041c635 in string_is_empty (
data=data@entry=0x16 <error: Cannot access memory at address 0x16>)
at libretro-common/string/stdstring.c:30
30 return (data == NULL) || (*data == '\0');
(gdb) bt
#include "shaders_common.h"
static const char* stock_fragment_xmb_snow = GLSL(
uniform float time;
uniform vec2 OutputSize;
void main(void)
{
float speed = time * 2;
vec2 uv = -1.0 + 2.0*gl_FragCoord.xy / OutputSize.xy;
FNAME=$1
# 1. Somehow sanitize the file content
# Remove \r (from Windows end-of-lines),
# Replace tabs by \t
# Replace " by \"
# Replace EOL by \n
CONTENT=$(sed -e 's/\r//' -e's/\t/\\t/g' -e 's/"/\\"/g' "${FNAME}" | awk '{ printf($0 "\\n") }')
# 2. Build the JSON request