コード例 #1
0
ファイル: Hook.cpp プロジェクト: NikTh/ssr
void glinject_my_glXSwapBuffers(Display* dpy, GLXDrawable drawable) {
	{
		std::lock_guard<std::mutex> lock(g_glinject_mutex);
		GLXFrameGrabber *fg = g_glinject->FindGLXFrameGrabber(dpy, drawable);
		if(fg == NULL) {
			GLINJECT_PRINT("Warning: glXSwapBuffers called without existing frame grabber, creating one assuming window == drawable.");
			fg = g_glinject->NewGLXFrameGrabber(dpy, drawable, drawable);
		}
		fg->GrabFrame();
	}
	g_glinject_real_glXSwapBuffers(dpy, drawable);
}
コード例 #2
0
ファイル: Hook.cpp プロジェクト: AugRob/ssr
void glinject_my_glXSwapBuffers(Display* dpy, GLXDrawable drawable) {
	GLFrameGrabber *fg = g_glinject.FindGrabber(dpy, drawable);
	if(fg == NULL) {
		fprintf(stderr, "[SSR-GLInject] Warning: glXSwapBuffers called without existing frame grabber, creating one assuming window == drawable.\n");
		fg = g_glinject.NewGrabber(dpy, drawable, drawable);
	}
	g_hotkey_info = fg->GetHotkeyInfo();
	if(g_hotkey_pressed) {
		fg->TriggerHotkey();
		g_hotkey_pressed = false;
	}
	fg->GrabFrame();
	g_glinject_real_glXSwapBuffers(dpy, drawable);
}