mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix mac tray icon to use template icon, no need to know theme any more
This commit is contained in:
@@ -13,6 +13,11 @@ extern "C" bool CanUseNewApiForScreenCaptureCheck() {
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" uint32_t majorVersion() {
|
||||
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
return version.majorVersion;
|
||||
}
|
||||
|
||||
extern "C" bool IsCanScreenRecording(bool prompt) {
|
||||
#ifdef NO_InputMonitoringAuthStatus
|
||||
return false;
|
||||
@@ -113,7 +118,7 @@ extern "C" float BackingScaleFactor() {
|
||||
// https://github.com/jhford/screenresolution/blob/master/cg_utils.c
|
||||
// https://github.com/jdoupe/screenres/blob/master/setgetscreen.m
|
||||
|
||||
size_t bitDepth(CGDisplayModeRef mode) {
|
||||
size_t bitDepth(CGDisplayModeRef mode) {
|
||||
size_t depth = 0;
|
||||
// Deprecated, same display same bpp?
|
||||
// https://stackoverflow.com/questions/8210824/how-to-avoid-cgdisplaymodecopypixelencoding-to-get-bpp
|
||||
|
||||
@@ -45,10 +45,15 @@ extern "C" {
|
||||
max: u32,
|
||||
numModes: *mut u32,
|
||||
) -> BOOL;
|
||||
fn majorVersion() -> u32;
|
||||
fn MacGetMode(display: u32, width: *mut u32, height: *mut u32) -> BOOL;
|
||||
fn MacSetMode(display: u32, width: u32, height: u32) -> BOOL;
|
||||
}
|
||||
|
||||
pub fn major_version() -> u32 {
|
||||
unsafe { majorVersion() }
|
||||
}
|
||||
|
||||
pub fn is_process_trusted(prompt: bool) -> bool {
|
||||
unsafe {
|
||||
let value = if prompt { YES } else { NO };
|
||||
|
||||
Reference in New Issue
Block a user