Skip to content

Instantly share code, notes, and snippets.

View rossy's full-sized avatar
👊
平気、へっちゃら!

James Ross-Gowan rossy

👊
平気、へっちゃら!
View GitHub Profile
@rossy
rossy / waittest.c
Last active December 19, 2015 11:09
// i686-w64-mingw32-gcc -std=c99 -Wall -municode waittest.c -o waittest.exe
#include <windows.h>
#include <windowsx.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
struct pump {
char* buf;
@rossy
rossy / gist:6098315
Created July 28, 2013 11:54
mpv debug output with WASAPI shared mode
Playing [UTW-Mazui]_Toaru_Kagaku_no_Railgun_S_-_13v2_[720p][CD016773].mkv.
Detected file format: Matroska
Clip info:
title: Toaru Kagaku no Railgun S - 13: Accelerator
[stream] Video (+) --vid=0 'H.264 720p HDTV' (h264)
[stream] Audio (+) --aid=0 --alang=jpn (*) 'AAC 2.0 256Kbps' (aac)
[stream] Subs (+) --sid=0 --slang=eng (*) 'Styled Subtitles' (ass)
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]
Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac]
Trying preferred audio driver 'wasapi'
@rossy
rossy / gist:6098316
Created July 28, 2013 11:54
mpv debug output with WASAPI exclusive mode
Playing [UTW-Mazui]_Toaru_Kagaku_no_Railgun_S_-_13v2_[720p][CD016773].mkv.
Detected file format: Matroska
Clip info:
title: Toaru Kagaku no Railgun S - 13: Accelerator
[stream] Video (+) --vid=0 'H.264 720p HDTV' (h264)
[stream] Audio (+) --aid=0 --alang=jpn (*) 'AAC 2.0 256Kbps' (aac)
[stream] Subs (+) --sid=0 --slang=eng (*) 'Styled Subtitles' (ass)
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]
Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac]
Trying preferred audio driver 'wasapi'
@rossy
rossy / wine
Created January 10, 2014 11:23
#!/bin/sh
exec "$@"
[vo/opengl-hq] win32: running at 1600x900
[vo/opengl-hq] Detected OpenGL 3.0.
[vo/opengl-hq] GL_VENDOR='Intel'
[vo/opengl-hq] GL_RENDERER='Intel(R) HD Graphics 4400'
[vo/opengl-hq] GL_VERSION='3.0.0 - Build 10.18.10.3345'
[vo/opengl-hq] GL_SHADING_LANGUAGE_VERSION='1.30 - Build 10.18.10.3345'
[vo/opengl-hq] OpenGL legacy compat. found.
[vo/opengl-hq] Combined OpenGL extensions string:
[vo/opengl-hq] GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_texture_edge_clamp GL_EXT_separate_specular_color GL_ARB_multitexture GL_ARB_map_buffer_alignment GL_ARB_conservative_depth GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_internalformat_query
#include <windows.h>
#include <stdio.h>
#include <stdbool.h>
static bool is_network_path(const wchar_t *path)
{
wchar_t vol[32768];
if (GetVolumePathNameW(path, vol, sizeof(vol) / sizeof(wchar_t)))
return GetDriveTypeW(vol) == DRIVE_REMOTE;
[input] key code=0x34a000a2 'Ctrl+MOUSE_BTN2' down
[input] key 'Ctrl+MOUSE_BTN2' -> 'seek 5' in 'default'
[input] key code=0x382000a2 'MOUSE_BTN2' up
[input] key code=0x61 'a'
[input] key 'Ctrl+MOUSE_BTN2-a' -> 'cycle angle' in 'default'
diff --git i/input/input.c w/input/input.c
index a578f8c..8f1ba12 100644
--- i/input/input.c
+++ w/input/input.c
@@ -549,9 +549,9 @@ static void release_down_cmd(struct input_ctx *ictx, bool drop_current)
static int find_key_down(struct input_ctx *ictx, int code)
{
- code &= ~(MP_KEY_STATE_UP | MP_KEY_STATE_DOWN);
+ code &= ~(MP_KEY_STATE_UP | MP_KEY_STATE_DOWN | MP_KEY_MODIFIER_MASK);
#include <unistd.h>
#include <stdio.h>
#include <stdbool.h>
#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <winternl.h>
#ifndef FILE_REMOTE_DEVICE
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Elantech\APOptimize\mpv]
"FileName"="mpv.exe"
"Class"="mpv"
"Text"=""
"FocusText"=""
"FocusClass"=""
"Option"=hex:\
01,\ ; Don't show cursor icon