diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2019-03-12 12:26:05 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2019-03-12 12:26:05 +0100 |
commit | 71461c608281fca98914f7cf3c36e5e53cb24df4 (patch) | |
tree | c30b3916b312115eb660ee10f5a02a7fec00d673 /PLUGINS | |
parent | 61ea56a1bd5e1aabe587155f1db613cdbaf8b753 (diff) | |
download | vdr-71461c608281fca98914f7cf3c36e5e53cb24df4.tar.gz vdr-71461c608281fca98914f7cf3c36e5e53cb24df4.tar.bz2 |
Changes for ncurses version 6
Diffstat (limited to 'PLUGINS')
-rw-r--r-- | PLUGINS/src/skincurses/HISTORY | 4 | ||||
-rw-r--r-- | PLUGINS/src/skincurses/skincurses.c | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY index 287653f3..cab83551 100644 --- a/PLUGINS/src/skincurses/HISTORY +++ b/PLUGINS/src/skincurses/HISTORY @@ -141,3 +141,7 @@ VDR Plugin 'skincurses' Revision History 2018-04-15: Version 2.4.0 - Official release. + +2019-03-12: Version 2.4.1 + +- Changes for ncurses version 6 (thanks to Ulrick Eckhardt). diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index aa719ef2..2c908071 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 4.3 2018/04/10 13:01:00 kls Exp $ + * $Id: skincurses.c 4.4 2019/03/12 12:24:34 kls Exp $ */ #include <ncurses.h> @@ -12,7 +12,7 @@ #include <vdr/skins.h> #include <vdr/videodir.h> -static const char *VERSION = "2.4.0"; +static const char *VERSION = "2.4.1"; static const char *DESCRIPTION = trNOOP("A text only skin"); static const char *MAINMENUENTRY = NULL; @@ -127,8 +127,12 @@ void cCursesOsd::SaveRegion(int x1, int y1, int x2, int y2) void cCursesOsd::RestoreRegion(void) { + int begy, begx; + int maxy, maxx; + getmaxyx(savedRegion, maxy,maxx); + getbegyx(savedRegion, begy,begx); if (savedRegion) { - copywin(savedRegion, window, 0, 0, savedRegion->_begy, savedRegion->_begx, savedRegion->_maxy - savedRegion->_begy, savedRegion->_maxx - savedRegion->_begx, false); + copywin(savedRegion, window, 0, 0, begy, begx, maxy - begy, maxx - begx, false); delwin(savedRegion); savedRegion = NULL; } @@ -828,9 +832,13 @@ bool cPluginSkinCurses::Initialize(void) { // Initialize any background activities the plugin shall perform. WINDOW *w = initscr(); + int begy, begx; + int maxy, maxx; + getmaxyx(w, maxy,maxx); + getbegyx(w, begy,begx); if (w) { - ScOsdWidth = w->_maxx - w->_begx + 1; - ScOsdHeight = w->_maxy - w->_begy + 1; + ScOsdWidth = maxx - begx + 1; + ScOsdHeight = maxy - begy + 1; return true; } return false; |