Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github_28344065
scrcpy
提交
a60aef5a
S
scrcpy
项目概览
github_28344065
/
scrcpy
与 Fork 源项目一致
从无法访问的项目Fork
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
scrcpy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a60aef5a
编写于
9月 04, 2018
作者:
R
Romain Vimont
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'philippsandhaus:master' into dev (#252)
Added new command line parameter to start in fullscreen
上级
34550311
28015c3e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
1 deletion
+21
-1
README.md
README.md
+6
-0
app/src/main.c
app/src/main.c
+10
-1
app/src/scrcpy.c
app/src/scrcpy.c
+4
-0
app/src/scrcpy.h
app/src/scrcpy.h
+1
-0
未找到文件。
README.md
浏览文件 @
a60aef5a
...
...
@@ -312,6 +312,12 @@ To show physical touches while scrcpy is running:
scrcpy
-t
```
The app may be started directly in fullscreen:
```
scrcpy -f
```
To run without installing:
```
bash
...
...
app/src/main.c
浏览文件 @
a60aef5a
...
...
@@ -11,6 +11,7 @@
struct
args
{
const
char
*
serial
;
const
char
*
crop
;
SDL_bool
fullscreen
;
SDL_bool
help
;
SDL_bool
version
;
SDL_bool
show_touches
;
...
...
@@ -36,6 +37,9 @@ static void usage(const char *arg0) {
" (typically, portrait for a phone, landscape for a tablet).
\n
"
" Any --max-size value is computed on the cropped size.
\n
"
"
\n
"
" -f, --fullscreen
\n
"
" Start in fullscreen.
\n
"
"
\n
"
" -h, --help
\n
"
" Print this help.
\n
"
"
\n
"
...
...
@@ -200,6 +204,7 @@ static SDL_bool parse_args(struct args *args, int argc, char *argv[]) {
static
const
struct
option
long_options
[]
=
{
{
"bit-rate"
,
required_argument
,
NULL
,
'b'
},
{
"crop"
,
required_argument
,
NULL
,
'c'
},
{
"fullscreen"
,
no_argument
,
NULL
,
'f'
},
{
"help"
,
no_argument
,
NULL
,
'h'
},
{
"max-size"
,
required_argument
,
NULL
,
'm'
},
{
"port"
,
required_argument
,
NULL
,
'p'
},
...
...
@@ -209,7 +214,7 @@ static SDL_bool parse_args(struct args *args, int argc, char *argv[]) {
{
NULL
,
0
,
NULL
,
0
},
};
int
c
;
while
((
c
=
getopt_long
(
argc
,
argv
,
"b:c:hm:p:s:tv"
,
long_options
,
NULL
))
!=
-
1
)
{
while
((
c
=
getopt_long
(
argc
,
argv
,
"b:c:
f
hm:p:s:tv"
,
long_options
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
'b'
:
if
(
!
parse_bit_rate
(
optarg
,
&
args
->
bit_rate
))
{
...
...
@@ -219,6 +224,9 @@ static SDL_bool parse_args(struct args *args, int argc, char *argv[]) {
case
'c'
:
args
->
crop
=
optarg
;
break
;
case
'f'
:
args
->
fullscreen
=
SDL_TRUE
;
break
;
case
'h'
:
args
->
help
=
SDL_TRUE
;
break
;
...
...
@@ -305,6 +313,7 @@ int main(int argc, char *argv[]) {
.
max_size
=
args
.
max_size
,
.
bit_rate
=
args
.
bit_rate
,
.
show_touches
=
args
.
show_touches
,
.
fullscreen
=
args
.
fullscreen
,
};
int
res
=
scrcpy
(
&
options
)
?
0
:
1
;
...
...
app/src/scrcpy.c
浏览文件 @
a60aef5a
...
...
@@ -223,6 +223,10 @@ SDL_bool scrcpy(const struct scrcpy_options *options) {
show_touches_waited
=
SDL_TRUE
;
}
if
(
options
->
fullscreen
)
{
screen_switch_fullscreen
(
&
screen
);
}
ret
=
event_loop
();
LOGD
(
"quit..."
);
...
...
app/src/scrcpy.h
浏览文件 @
a60aef5a
...
...
@@ -10,6 +10,7 @@ struct scrcpy_options {
Uint16
max_size
;
Uint32
bit_rate
;
SDL_bool
show_touches
;
SDL_bool
fullscreen
;
};
SDL_bool
scrcpy
(
const
struct
scrcpy_options
*
options
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录