summaryrefslogtreecommitdiff
path: root/PLUGINS/src/skincurses/skincurses.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2019-03-12 12:26:05 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2019-03-12 12:26:05 +0100
commit71461c608281fca98914f7cf3c36e5e53cb24df4 (patch)
treec30b3916b312115eb660ee10f5a02a7fec00d673 /PLUGINS/src/skincurses/skincurses.c
parent61ea56a1bd5e1aabe587155f1db613cdbaf8b753 (diff)
downloadvdr-71461c608281fca98914f7cf3c36e5e53cb24df4.tar.gz
vdr-71461c608281fca98914f7cf3c36e5e53cb24df4.tar.bz2
Changes for ncurses version 6
Diffstat (limited to 'PLUGINS/src/skincurses/skincurses.c')
-rw-r--r--PLUGINS/src/skincurses/skincurses.c18
1 files changed, 13 insertions, 5 deletions
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;