Use curses library to blank the screen when videos aren't playing.

This commit is contained in:
DragonMinded 2016-01-30 20:03:14 +00:00
parent 53cc49af69
commit 48af6598fa
2 changed files with 18 additions and 2 deletions

View File

@ -7,13 +7,14 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <curses.h>
#include "DVDEmu.h"
#include "Serial.h"
#include "Video.h"
#include "Victor_XV-D701.h"
#include "Toshiba_SD-B100.h"
#define VERBOSE_DEBUG 1
#define VERBOSE_DEBUG 0
int getDirectoryCount( const char * const directory )
{
@ -188,6 +189,21 @@ int main( int argc, char *argv[] )
return 1;
}
if( !VERBOSE_DEBUG )
{
/* Init curses */
initscr();
/* Remove everything on the screen */
erase();
/* Turn off cursor */
curs_set( 0 );
/* Display this */
refresh();
}
/* Ensure we start fresh */
PurgeComm( serial );

View File

@ -1,7 +1,7 @@
all: dvdemu
dvdemu: DVDEmu.cpp DVDEmu.h Serial.cpp Serial.h Video.cpp Video.h Toshiba_SD-B100.cpp Toshiba_SD-B100.h Victor_XV-D701.cpp Victor_XV-D701.h
g++ -Wall -Werror -D_BSD_SOURCE -pthread -o dvdemu DVDEmu.cpp Serial.cpp Video.cpp Toshiba_SD-B100.cpp Victor_XV-D701.cpp -ggdb
g++ -Wall -Werror -D_BSD_SOURCE -pthread -lcurses -o dvdemu DVDEmu.cpp Serial.cpp Video.cpp Toshiba_SD-B100.cpp Victor_XV-D701.cpp -ggdb
.DUMMY: clean
clean: