mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed 'Changes for ncurses version 6'
This commit is contained in:
parent
35b936200f
commit
d354d01af7
@ -145,3 +145,7 @@ VDR Plugin 'skincurses' Revision History
|
|||||||
2019-03-12: Version 2.4.1
|
2019-03-12: Version 2.4.1
|
||||||
|
|
||||||
- Changes for ncurses version 6 (thanks to Ulrick Eckhardt).
|
- Changes for ncurses version 6 (thanks to Ulrick Eckhardt).
|
||||||
|
|
||||||
|
2020-05-10: Version 2.4.2
|
||||||
|
|
||||||
|
- Fixed 'Changes for ncurses version 6'.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: skincurses.c 4.4 2019/03/12 12:24:34 kls Exp $
|
* $Id: skincurses.c 4.5 2020/05/10 09:04:31 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#include <vdr/skins.h>
|
#include <vdr/skins.h>
|
||||||
#include <vdr/videodir.h>
|
#include <vdr/videodir.h>
|
||||||
|
|
||||||
static const char *VERSION = "2.4.1";
|
static const char *VERSION = "2.4.2";
|
||||||
static const char *DESCRIPTION = trNOOP("A text only skin");
|
static const char *DESCRIPTION = trNOOP("A text only skin");
|
||||||
static const char *MAINMENUENTRY = NULL;
|
static const char *MAINMENUENTRY = NULL;
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ cCursesOsd::cCursesOsd(int Left, int Top)
|
|||||||
start_color();
|
start_color();
|
||||||
leaveok(stdscr, true);
|
leaveok(stdscr, true);
|
||||||
|
|
||||||
window = subwin(stdscr, ScOsdHeight, ScOsdWidth, 0, 0);
|
window = stdscr;
|
||||||
syncok(window, true);
|
syncok(window, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,6 @@ cCursesOsd::~cCursesOsd()
|
|||||||
if (window) {
|
if (window) {
|
||||||
werase(window);
|
werase(window);
|
||||||
Flush();
|
Flush();
|
||||||
delwin(window);
|
|
||||||
window = NULL;
|
window = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,17 +121,14 @@ void cCursesOsd::SaveRegion(int x1, int y1, int x2, int y2)
|
|||||||
savedRegion = NULL;
|
savedRegion = NULL;
|
||||||
}
|
}
|
||||||
savedRegion = newwin(y2 - y1 + 1, x2 - x1 + 1, y1, x1);
|
savedRegion = newwin(y2 - y1 + 1, x2 - x1 + 1, y1, x1);
|
||||||
copywin(window, savedRegion, y1, x1, 0, 0, y2 - y1, x2 - x1, false);
|
if (savedRegion)
|
||||||
|
copywin(window, savedRegion, y1, x1, 0, 0, y2 - y1, x2 - x1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cCursesOsd::RestoreRegion(void)
|
void cCursesOsd::RestoreRegion(void)
|
||||||
{
|
{
|
||||||
int begy, begx;
|
|
||||||
int maxy, maxx;
|
|
||||||
getmaxyx(savedRegion, maxy,maxx);
|
|
||||||
getbegyx(savedRegion, begy,begx);
|
|
||||||
if (savedRegion) {
|
if (savedRegion) {
|
||||||
copywin(savedRegion, window, 0, 0, begy, begx, maxy - begy, maxx - begx, false);
|
overwrite(savedRegion, window);
|
||||||
delwin(savedRegion);
|
delwin(savedRegion);
|
||||||
savedRegion = NULL;
|
savedRegion = NULL;
|
||||||
}
|
}
|
||||||
@ -837,8 +833,8 @@ bool cPluginSkinCurses::Initialize(void)
|
|||||||
getmaxyx(w, maxy,maxx);
|
getmaxyx(w, maxy,maxx);
|
||||||
getbegyx(w, begy,begx);
|
getbegyx(w, begy,begx);
|
||||||
if (w) {
|
if (w) {
|
||||||
ScOsdWidth = maxx - begx + 1;
|
ScOsdWidth = maxx - begx;
|
||||||
ScOsdHeight = maxy - begy + 1;
|
ScOsdHeight = maxy - begy;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user