mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 03:55:05 +00:00
Merge pull request #4 from team-mobot/ENG-2350-fix-mac-scrcpy
ENG-2350 Fix macOS title bar showing despite --window-borderless
This commit is contained in:
commit
e7ee8e38cb
2 changed files with 21 additions and 1 deletions
|
@ -283,6 +283,13 @@ screen_init_rendering(struct screen *screen, const char *window_title,
|
|||
const char *renderer_name = r ? NULL : renderer_info.name;
|
||||
LOGI("Renderer: %s", renderer_name ? renderer_name : "(unknown)");
|
||||
|
||||
// NOTE(frankleonrose): Despite setting flags on window construction,
|
||||
// version 1.17 of scrcpy on macOS was showing the title bar when
|
||||
// --window-borderless flag was used. Explicitly setting border
|
||||
// property here solved the problem.
|
||||
LOGI("Borderless: %s", window_borderless ? "Yes" : "No");
|
||||
SDL_SetWindowBordered(screen->window, !window_borderless);
|
||||
|
||||
// starts with "opengl"
|
||||
screen->use_opengl = renderer_name && !strncmp(renderer_name, "opengl", 6);
|
||||
if (screen->use_opengl) {
|
||||
|
|
15
mobot.mk
15
mobot.mk
|
@ -7,6 +7,9 @@
|
|||
# sudo snap install scrcpy (for server .jar)
|
||||
# On Raspberry Pi it may be necessary to install
|
||||
# sudo apt-get install ninja-build meson libudev1 libsdl2-dev
|
||||
# On macOS, if for some reason you have libiconv via Mac Ports, deactivate it
|
||||
# before building
|
||||
# sudo port deactivate libiconv
|
||||
|
||||
.DEFAULT_GOAL := scrcpy
|
||||
|
||||
|
@ -14,12 +17,22 @@ AVDIR:=build-libav
|
|||
AVLIBDIR:=$(AVDIR)/lib
|
||||
AVLIBS:=$(AVLIBDIR)/libavformat.a $(AVLIBDIR)/libavcodec.a $(AVLIBDIR)/libavutil.a $(AVLIBDIR)/libswscale.a
|
||||
|
||||
OS := $(shell uname -s)
|
||||
ifeq ($(OS),Darwin)
|
||||
MAC_LDFLAGS := -Wl,-framework -Wl,CoreVideo \
|
||||
-Wl,-framework -Wl,CoreMedia \
|
||||
-Wl,-framework -Wl,Foundation \
|
||||
-Wl,-framework -Wl,VideoToolbox \
|
||||
-Wl,-liconv
|
||||
endif
|
||||
|
||||
build-ffmpeg:
|
||||
git clone https://github.com/team-mobot/FFmpeg.git build-ffmpeg
|
||||
|
||||
$(AVLIBS): build-ffmpeg
|
||||
# Build Mobot version of FFmpeg and install in subdir libav
|
||||
cd build-ffmpeg && \
|
||||
git pull && \
|
||||
git checkout release/4.3 && \
|
||||
./configure --prefix="../build-libav" \
|
||||
--pkg-config-flags="--static" \
|
||||
|
@ -36,7 +49,7 @@ $(AVLIBS): build-ffmpeg
|
|||
make install-libs install-headers
|
||||
|
||||
build-app: $(AVLIBS)
|
||||
LDFLAGS="-Wl,-lm -Wl,-lpthread" \
|
||||
LDFLAGS="-Wl,-lm -Wl,-lpthread $(MAC_LDFLAGS)" \
|
||||
meson build-app --buildtype release --strip -Db_lto=true \
|
||||
-Dlocal_libav=$(AVDIR) \
|
||||
-Dcompile_server=false \
|
||||
|
|
Loading…
Add table
Reference in a new issue