Update for latest ncurses-rs

This commit is contained in:
Alexandre Bury 2016-10-09 17:48:31 -07:00
parent 651c7d619b
commit 9871e12734
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ unicode-width = "0.1"
[dependencies.ncurses]
features = ["wide"]
optional = true
version = "5.82.0"
version = "5.83.0"
[dependencies.termion]
optional = true

View File

@ -12,12 +12,12 @@ impl backend::Backend for NcursesBackend {
::std::env::set_var("ESCDELAY", "25");
ncurses::setlocale(ncurses::LcCategory::all, "");
ncurses::initscr();
ncurses::keypad(unsafe { ncurses::stdscr }, true);
ncurses::keypad(unsafe { ncurses::stdscr() }, true);
ncurses::noecho();
ncurses::cbreak();
ncurses::start_color();
ncurses::curs_set(ncurses::CURSOR_VISIBILITY::CURSOR_INVISIBLE);
ncurses::wbkgd(unsafe { ncurses::stdscr },
ncurses::wbkgd(unsafe { ncurses::stdscr() },
ncurses::COLOR_PAIR(ColorStyle::Background.id()));
NcursesBackend
@ -26,7 +26,7 @@ impl backend::Backend for NcursesBackend {
fn screen_size(&self) -> (usize, usize) {
let mut x: i32 = 0;
let mut y: i32 = 0;
ncurses::getmaxyx(unsafe { ncurses::stdscr }, &mut y, &mut x);
ncurses::getmaxyx(unsafe { ncurses::stdscr() }, &mut y, &mut x);
(x as usize, y as usize)
}