Fix build warnings on macOS/Windows
This commit is contained in:
parent
88d87cfa86
commit
a14c51797f
|
@ -31,9 +31,9 @@ use parking_lot::MutexGuard;
|
|||
#[cfg(not(any(target_os = "macos", windows)))]
|
||||
use wayland_client::{Display as WaylandDisplay, EventQueue};
|
||||
|
||||
use font::{self, Rasterize};
|
||||
#[cfg(target_os = "macos")]
|
||||
use font::set_font_smoothing;
|
||||
use font::{self, Rasterize};
|
||||
|
||||
use alacritty_terminal::config::{Font, StartupMode};
|
||||
use alacritty_terminal::event::{Event, OnResize};
|
||||
|
|
|
@ -22,9 +22,9 @@ use glutin::platform::unix::EventLoopWindowTargetExtUnix;
|
|||
use log::{debug, info, warn};
|
||||
use serde_json as json;
|
||||
|
||||
use font::{self, Size};
|
||||
#[cfg(target_os = "macos")]
|
||||
use font::set_font_smoothing;
|
||||
use font::{self, Size};
|
||||
|
||||
use alacritty_terminal::clipboard::ClipboardType;
|
||||
use alacritty_terminal::config::Font;
|
||||
|
|
|
@ -930,6 +930,7 @@ impl<'a, C> RenderApi<'a, C> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "macos", windows)))]
|
||||
pub fn finish(&self) {
|
||||
unsafe {
|
||||
gl::Finish();
|
||||
|
|
|
@ -281,7 +281,6 @@ pub struct Font {
|
|||
|
||||
unsafe impl Send for Font {}
|
||||
|
||||
|
||||
/// Set subpixel anti-aliasing on macOS.
|
||||
///
|
||||
/// Sub-pixel anti-aliasing has been disabled since macOS Mojave by default. This function allows
|
||||
|
@ -294,7 +293,7 @@ pub fn set_font_smoothing(enable: bool) {
|
|||
unsafe {
|
||||
// Check that we're running at least Mojave (10.14.0+).
|
||||
if !NSProcessInfo::processInfo(nil).isOperatingSystemAtLeastVersion(min_macos_version) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
let key = NSString::alloc(nil).init_str("CGFontRenderingFontSmoothingDisabled");
|
||||
|
|
Loading…
Reference in New Issue