Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
01c72007
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
01c72007
编写于
9月 08, 2020
作者:
J
Jim
提交者:
GitHub
9月 08, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3435 from jpark37/game-capture-messages
win-capture: Improve game capture messages
上级
0ba9b201
7cf148e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
8 deletion
+12
-8
plugins/win-capture/graphics-hook/graphics-hook.c
plugins/win-capture/graphics-hook/graphics-hook.c
+12
-8
未找到文件。
plugins/win-capture/graphics-hook/graphics-hook.c
浏览文件 @
01c72007
...
...
@@ -69,7 +69,7 @@ bool init_pipe(void)
sprintf
(
new_name
,
"%s%lu"
,
PIPE_NAME
,
GetCurrentProcessId
());
if
(
!
ipc_pipe_client_open
(
&
pipe
,
new_name
))
{
DbgOut
(
"Failed to open pipe
\n
"
);
DbgOut
(
"
[OBS]
Failed to open pipe
\n
"
);
return
false
;
}
...
...
@@ -158,7 +158,10 @@ static inline void log_current_process(void)
MAX_PATH
);
if
(
len
>
0
)
{
process_name
[
len
]
=
0
;
hlog
(
"Hooked to process: %s"
,
process_name
);
hlog
(
"graphics-hook.dll loaded against process: %s"
,
process_name
);
}
else
{
hlog
(
"graphics-hook.dll loaded"
);
}
hlog
(
"(half life scientist) everything.. seems to be in order"
);
...
...
@@ -328,7 +331,7 @@ static inline bool attempt_hook(void)
if
(
!
d3d9_hooked
)
{
if
(
!
d3d9_hookable
())
{
DbgOut
(
"no D3D9 hook address found!
\n
"
);
DbgOut
(
"
[OBS]
no D3D9 hook address found!
\n
"
);
d3d9_hooked
=
true
;
}
else
{
d3d9_hooked
=
hook_d3d9
();
...
...
@@ -340,7 +343,7 @@ static inline bool attempt_hook(void)
if
(
!
dxgi_hooked
)
{
if
(
!
dxgi_hookable
())
{
DbgOut
(
"no DXGI hook address found!
\n
"
);
DbgOut
(
"
[OBS]
no DXGI hook address found!
\n
"
);
dxgi_hooked
=
true
;
}
else
{
dxgi_hooked
=
hook_dxgi
();
...
...
@@ -403,7 +406,7 @@ static inline void capture_loop(void)
static
DWORD
WINAPI
main_capture_thread
(
HANDLE
thread_handle
)
{
if
(
!
init_hook
(
thread_handle
))
{
DbgOut
(
"Failed to init hook
\n
"
);
DbgOut
(
"
[OBS]
Failed to init hook
\n
"
);
free_hook
();
return
0
;
}
...
...
@@ -416,10 +419,11 @@ static inline void hlogv(const char *format, va_list args)
{
char
message
[
1024
]
=
""
;
int
num
=
_vsprintf_p
(
message
,
1024
,
format
,
args
);
if
(
num
)
{
if
(
num
>
0
)
{
if
(
!
ipc_pipe_client_write
(
&
pipe
,
message
,
(
size_t
)
num
+
1
))
{
ipc_pipe_client_free
(
&
pipe
);
}
DbgOut
(
"[OBS] "
);
DbgOut
(
message
);
DbgOut
(
"
\n
"
);
}
...
...
@@ -836,7 +840,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID unused1)
dll_inst
=
hinst
;
if
(
!
init_dll
())
{
DbgOut
(
"Duplicate hook library"
);
DbgOut
(
"
[OBS]
Duplicate hook library"
);
return
false
;
}
...
...
@@ -847,7 +851,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID unused1)
SYNCHRONIZE
,
false
,
0
);
if
(
!
success
)
DbgOut
(
"Failed to get current thread handle"
);
DbgOut
(
"
[OBS]
Failed to get current thread handle"
);
if
(
!
init_signals
())
{
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录