fix(windows): fixed black screen while navigating between videos in full screen
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME in the
|
||||
@@ -26,6 +26,9 @@ add_executable(${BINARY_NAME} WIN32
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Setup precompiled header
|
||||
target_precompile_headers(${BINARY_NAME} PRIVATE "pch.h")
|
||||
|
||||
# Add preprocessor definitions for the build version.
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
|
||||
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
|
||||
|
||||
@@ -438,6 +438,10 @@ void MpvPlayerPlugin::HandleMethodCall(
|
||||
HWND hwnd = GetWindow();
|
||||
bool success = display_mode_manager_.RestoreOriginalHDRState(hwnd);
|
||||
result->Success(flutter::EncodableValue(success));
|
||||
} else if (method == "isModeChanged") {
|
||||
result->Success(flutter::EncodableValue(display_mode_manager_.IsModeChanged()));
|
||||
} else if (method == "isHDRChanged") {
|
||||
result->Success(flutter::EncodableValue(display_mode_manager_.IsHDRChanged()));
|
||||
} else {
|
||||
result->NotImplemented();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
#include <Windows.h>
|
||||
#include <dwmapi.h>
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user