Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
0fb79a47
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0fb79a47
编写于
8月 01, 2015
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libobs: Use get_win_ver (not GetVersionEx)
上级
ef332ab8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
26 deletion
+18
-26
libobs/obs-win-crash-handler.c
libobs/obs-win-crash-handler.c
+6
-10
libobs/obs-windows.c
libobs/obs-windows.c
+9
-13
libobs/util/platform-windows.c
libobs/util/platform-windows.c
+3
-3
未找到文件。
libobs/obs-win-crash-handler.c
浏览文件 @
0fb79a47
...
...
@@ -24,6 +24,7 @@
#include "obs-config.h"
#include "util/dstr.h"
#include "util/platform.h"
#include "util/windows/win-version.h"
typedef
BOOL
(
WINAPI
*
ENUMERATELOADEDMODULES64
)(
HANDLE
process
,
PENUMLOADED_MODULES_CALLBACK64
enum_loaded_modules_callback
,
...
...
@@ -84,7 +85,7 @@ struct exception_handler_data {
HMODULE
dbghelp
;
SYMBOL_INFOW
*
sym_info
;
PEXCEPTION_POINTERS
exception
;
OSVERSIONINFOEX
osvi
;
struct
win_version_info
win_version
;
SYSTEMTIME
time_info
;
HANDLE
process
;
...
...
@@ -178,12 +179,7 @@ static inline void init_sym_info(struct exception_handler_data *data)
static
inline
void
init_version_info
(
struct
exception_handler_data
*
data
)
{
data
->
osvi
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
if
(
!
GetVersionEx
((
OSVERSIONINFO
*
)
&
data
->
osvi
))
{
data
->
osvi
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFO
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
data
->
osvi
);
}
get_win_ver
(
&
data
->
win_version
);
}
#define PROCESSOR_REG_KEY L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"
...
...
@@ -247,13 +243,13 @@ static inline void write_header(struct exception_handler_data *data)
dstr_catf
(
&
data
->
str
,
"Unhandled exception: %x
\n
"
"Fault address: %"
PRIX64
" (%s)
\n
"
"libobs version: "
OBS_VERSION
"
\n
"
"Windows version: %d.%d
(build %d) %s
\n
"
"Windows version: %d.%d
build %d (revision %d)
\n
"
"CPU: %s
\n\n
"
,
data
->
exception
->
ExceptionRecord
->
ExceptionCode
,
data
->
main_trace
.
instruction_ptr
,
data
->
module_name
.
array
,
data
->
osvi
.
dwMajorVersion
,
data
->
osvi
.
dwMinorVersion
,
data
->
osvi
.
dwBuildNumber
,
data
->
osvi
.
szCSDVersion
,
data
->
win_version
.
major
,
data
->
win_version
.
minor
,
data
->
win_version
.
build
,
data
->
win_version
.
revis
,
data
->
cpu_info
.
array
);
}
...
...
libobs/obs-windows.c
浏览文件 @
0fb79a47
...
...
@@ -15,6 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#include "util/windows/win-version.h"
#include "util/platform.h"
#include "util/dstr.h"
#include "obs.h"
...
...
@@ -22,7 +23,6 @@
#include <windows.h>
static
OSVERSIONINFOW
osvi
=
{
0
};
static
uint32_t
win_ver
=
0
;
const
char
*
get_module_extension
(
void
)
...
...
@@ -174,16 +174,11 @@ static void log_available_memory(void)
static
void
log_windows_version
(
void
)
{
char
*
build
=
NULL
;
struct
win_version_info
ver
;
get_win_ver
(
&
ver
);
os_wcs_to_utf8_ptr
(
osvi
.
szCSDVersion
,
0
,
&
build
);
blog
(
LOG_INFO
,
"Windows Version: %ld.%ld Build %ld %s"
,
osvi
.
dwMajorVersion
,
osvi
.
dwMinorVersion
,
osvi
.
dwBuildNumber
,
build
);
bfree
(
build
);
blog
(
LOG_INFO
,
"Windows Version: %d.%d Build %d (revision: %d)"
,
ver
.
major
,
ver
.
minor
,
ver
.
build
,
ver
.
revis
);
}
typedef
HRESULT
(
WINAPI
*
dwm_is_composition_enabled_t
)(
BOOL
*
);
...
...
@@ -215,9 +210,10 @@ static void log_aero(void)
void
log_system_info
(
void
)
{
osvi
.
dwOSVersionInfoSize
=
sizeof
(
osvi
);
GetVersionExW
(
&
osvi
);
win_ver
=
(
osvi
.
dwMajorVersion
<<
8
)
|
osvi
.
dwMinorVersion
;
struct
win_version_info
ver
;
get_win_ver
(
&
ver
);
win_ver
=
(
ver
.
major
<<
8
)
|
ver
.
minor
;
log_processor_info
();
log_processor_cores
();
...
...
libobs/util/platform-windows.c
浏览文件 @
0fb79a47
...
...
@@ -41,9 +41,9 @@ static inline uint64_t get_clockfreq(void)
static
inline
uint32_t
get_winver
(
void
)
{
if
(
!
winver
)
{
OSVERSIONINFO
osvi
;
memset
(
&
osvi
,
0
,
sizeof
(
osvi
)
);
winver
=
(
osvi
.
dwMajorVersion
<<
16
)
|
(
osvi
.
dwMinorVersion
)
;
struct
win_version_info
ver
;
get_win_ver
(
&
ver
);
winver
=
(
ver
.
major
<<
16
)
|
ver
.
minor
;
}
return
winver
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录