summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/baresip.h1
-rw-r--r--modules/sdl2/sdl.c8
-rw-r--r--src/config.c5
-rw-r--r--src/video.c1
4 files changed, 11 insertions, 4 deletions
diff --git a/include/baresip.h b/include/baresip.h
index e423ffc..c88b213 100644
--- a/include/baresip.h
+++ b/include/baresip.h
@@ -216,6 +216,7 @@ struct config_video {
unsigned width, height; /**< Video resolution */
uint32_t bitrate; /**< Encoder bitrate in [bit/s] */
uint32_t fps; /**< Video framerate */
+ bool fullscreen; /**< Enable fullscreen display */
};
#endif
diff --git a/modules/sdl2/sdl.c b/modules/sdl2/sdl.c
index ef719cd..c2413bb 100644
--- a/modules/sdl2/sdl.c
+++ b/modules/sdl2/sdl.c
@@ -102,9 +102,11 @@ static void event_handler(void *arg)
st->fullscreen ? "en" : "dis");
if (st->fullscreen)
- st->flags |= SDL_WINDOW_FULLSCREEN;
+ st->flags |=
+ SDL_WINDOW_FULLSCREEN_DESKTOP;
else
- st->flags &= ~SDL_WINDOW_FULLSCREEN;
+ st->flags &=
+ ~SDL_WINDOW_FULLSCREEN_DESKTOP;
SDL_SetWindowFullscreen(st->window, st->flags);
break;
@@ -195,7 +197,7 @@ static int display(struct vidisp_st *st, const char *title,
st->flags = SDL_WINDOW_SHOWN | SDL_WINDOW_INPUT_FOCUS;
if (st->fullscreen)
- st->flags |= SDL_WINDOW_FULLSCREEN;
+ st->flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
if (title) {
re_snprintf(capt, sizeof(capt), "%s - %u x %u",
diff --git a/src/config.c b/src/config.c
index 9f2de5d..960861c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -61,6 +61,7 @@ static struct config core_config = {
352, 288,
500000,
25,
+ true,
},
#endif
@@ -212,6 +213,7 @@ int config_parse_conf(struct config *cfg, const struct conf *conf)
}
(void)conf_get_u32(conf, "video_bitrate", &cfg->video.bitrate);
(void)conf_get_u32(conf, "video_fps", &cfg->video.fps);
+ (void)conf_get_bool(conf, "video_fullscreen", &cfg->video.fullscreen);
#else
(void)size;
#endif
@@ -470,7 +472,8 @@ static int core_config_template(struct re_printf *pf, const struct config *cfg)
"#video_display\t\t%s\n"
"video_size\t\t%dx%d\n"
"video_bitrate\t\t%u\n"
- "video_fps\t\t%u\n",
+ "video_fps\t\t%u\n"
+ "video_fullscreen\t\tyes\n",
default_video_device(),
default_video_display(),
cfg->video.width, cfg->video.height,
diff --git a/src/video.c b/src/video.c
index 32b256f..8818631 100644
--- a/src/video.c
+++ b/src/video.c
@@ -871,6 +871,7 @@ static int set_vidisp(struct vrx *vrx)
vrx->vidisp = mem_deref(vrx->vidisp);
vrx->vidisp_prm.view = NULL;
+ vrx->vidisp_prm.fullscreen = vrx->video->cfg.fullscreen;
vd = (struct vidisp *)vidisp_find(baresip_vidispl(),
vrx->video->cfg.disp_mod);