mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 06:39:23 +00:00
* Throw internal error if ncurses 'newwin' fails.
* Cleaned up logging of mincore stats. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1203 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -47,6 +47,13 @@ namespace display {
|
||||
|
||||
bool Canvas::m_isInitialized = false;
|
||||
|
||||
Canvas::Canvas(int x, int y, int width, int height) :
|
||||
m_window(newwin(height, width, y, x)) {
|
||||
|
||||
if (m_window == NULL)
|
||||
throw torrent::internal_error("Could not allocate ncurses canvas.");
|
||||
}
|
||||
|
||||
void
|
||||
Canvas::resize(int x, int y, int w, int h) {
|
||||
wresize(m_window, h, w);
|
||||
|
||||
Reference in New Issue
Block a user