From 5fed541ad2924e25d4a9408ad2bbce27ca8dd72a Mon Sep 17 00:00:00 2001 From: magiblot Date: Sat, 16 Nov 2024 02:14:36 +0100 Subject: [PATCH] tvdemo: do not show 'Video mode' menu entry on modern platforms --- examples/tvdemo/tvcmds.h | 2 +- examples/tvdemo/tvdemo3.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/tvdemo/tvcmds.h b/examples/tvdemo/tvcmds.h index 3cc32e6a..c4285c1d 100644 --- a/examples/tvdemo/tvcmds.h +++ b/examples/tvdemo/tvcmds.h @@ -28,6 +28,6 @@ const int cmRestoreCmd = 111; const int cmEventViewCmd= 112; const int cmChBackground= 113; const int cmFndEventView= 114; -const int cmVideoMode = 2002; +const int cmVideoMode = 115; #endif // __TVCMDS_H diff --git a/examples/tvdemo/tvdemo3.cpp b/examples/tvdemo/tvdemo3.cpp index 75945b93..dda04fda 100644 --- a/examples/tvdemo/tvdemo3.cpp +++ b/examples/tvdemo/tvdemo3.cpp @@ -184,10 +184,13 @@ TMenuBar *TVDemo::initMenuBar(TRect r) { TSubMenu& sub1 = *new TSubMenu( "~\360~", 0, hcSystem ) + - *new TMenuItem( "~V~ideo mode", cmVideoMode, kbNoKey, hcNoContext, "" ) + - newLine() + *new TMenuItem( "~A~bout...", cmAboutCmd, kbNoKey, hcSAbout ) + newLine() + +#if defined( __BORLANDC__ ) + // Changing the screen mode only makes sense on DOS or DPMI. + *new TMenuItem( "~V~ideo mode", cmVideoMode, kbNoKey, hcNoContext ) + + newLine() + +#endif *new TMenuItem( "~P~uzzle", cmPuzzleCmd, kbNoKey, hcSPuzzle ) + *new TMenuItem( "Ca~l~endar", cmCalendarCmd, kbNoKey, hcSCalendar ) + *new TMenuItem( "Ascii ~T~able", cmAsciiCmd, kbNoKey, hcSAsciiTable ) +