Skip to content

Commit

Permalink
fix:Add Support For Meizu Phone
Browse files Browse the repository at this point in the history
Fix the error case by flyme nightMode.
issue Genymobile#1
  • Loading branch information
olbb authored and NickStemerdink committed Jun 3, 2019
1 parent e572d81 commit 817e3cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
import android.os.IBinder;
import android.os.Looper;
import android.view.Surface;

import java.io.FileDescriptor;
Expand Down Expand Up @@ -65,6 +66,7 @@ public void streamScreen(Device device, FileDescriptor fd) throws IOException {
Rect videoRect = device.getScreenInfo().getVideoSize().toRect();
setSize(format, videoRect.width(), videoRect.height());
configure(codec, format);
Looper.prepare();
Surface surface = codec.createInputSurface();
setDisplaySurface(display, surface, contentRect, videoRect);
codec.start();
Expand Down

0 comments on commit 817e3cd

Please sign in to comment.