Let all anvil features compile standalone
This commit is contained in:
parent
ed74862273
commit
90c0112cd3
|
@ -17,7 +17,7 @@ xkbcommon = "0.2.1"
|
||||||
[dependencies.smithay]
|
[dependencies.smithay]
|
||||||
path = ".."
|
path = ".."
|
||||||
default-features = false
|
default-features = false
|
||||||
features = [ "renderer_glium" ]
|
features = [ "renderer_glium", "backend_egl" ]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gl_generator = "0.9"
|
gl_generator = "0.9"
|
||||||
|
|
|
@ -24,6 +24,7 @@ use shell::init_shell;
|
||||||
pub fn run_winit(display: &mut Display, event_loop: &mut EventLoop<()>, log: Logger) -> Result<(), ()> {
|
pub fn run_winit(display: &mut Display, event_loop: &mut EventLoop<()>, log: Logger) -> Result<(), ()> {
|
||||||
let (renderer, mut input) = winit::init(log.clone()).map_err(|_| ())?;
|
let (renderer, mut input) = winit::init(log.clone()).map_err(|_| ())?;
|
||||||
|
|
||||||
|
#[cfg(feature = "egl")]
|
||||||
let egl_display = Rc::new(RefCell::new(
|
let egl_display = Rc::new(RefCell::new(
|
||||||
if let Ok(egl_display) = renderer.bind_wl_display(&display) {
|
if let Ok(egl_display) = renderer.bind_wl_display(&display) {
|
||||||
info!(log, "EGL hardware-acceleration enabled");
|
info!(log, "EGL hardware-acceleration enabled");
|
||||||
|
@ -34,7 +35,10 @@ pub fn run_winit(display: &mut Display, event_loop: &mut EventLoop<()>, log: Log
|
||||||
));
|
));
|
||||||
|
|
||||||
let (w, h) = renderer.get_framebuffer_dimensions();
|
let (w, h) = renderer.get_framebuffer_dimensions();
|
||||||
|
#[cfg(feature = "egl")]
|
||||||
let drawer = GliumDrawer::init(renderer, egl_display, log.clone());
|
let drawer = GliumDrawer::init(renderer, egl_display, log.clone());
|
||||||
|
#[cfg(not(feature = "egl"))]
|
||||||
|
let drawer = GliumDrawer::init(renderer, log.clone());
|
||||||
|
|
||||||
let name = display.add_socket_auto().unwrap().into_string().unwrap();
|
let name = display.add_socket_auto().unwrap().into_string().unwrap();
|
||||||
info!(log, "Listening on wayland socket"; "name" => name.clone());
|
info!(log, "Listening on wayland socket"; "name" => name.clone());
|
||||||
|
|
Loading…
Reference in New Issue