Win32 - more context menu items

This commit is contained in:
adelikat 2008-12-13 02:28:05 +00:00
parent 26fdf49777
commit db4c46e79e
3 changed files with 46 additions and 9 deletions

View File

@ -323,16 +323,22 @@ END
FCEUCONTEXTMENUS MENU FCEUCONTEXTMENUS MENU
BEGIN BEGIN
POPUP "Game+Movie" POPUP "Game+Movie+readonly"
BEGIN BEGIN
MENUITEM "Play Movie from Beginning", FCEU_CONTEXT_PLAYMOVIEFROMBEGINNING MENUITEM "Play Movie from Beginning", FCEU_CONTEXT_PLAYMOVIEFROMBEGINNING
MENUITEM "Stop Movie", FCEU_CONTEXT_STOPMOVIE MENUITEM "Stop Movie Replay", FCEU_CONTEXT_STOPMOVIE
MENUITEM SEPARATOR
MENUITEM "Rewind to last auto-save", FCEUX_CONTEXT_REWINDTOLASTAUTO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Help....", FCEU_CONTEXT_MOVIEHELP MENUITEM "&Help....", FCEU_CONTEXT_MOVIEHELP
END END
POPUP "Game+NoMovie" POPUP "Game+NoMovie"
BEGIN BEGIN
MENUITEM "&Replay Movie", FCEUX_CONTEXT_REPLAYMOVIE MENUITEM "&Replay Movie", FCEUX_CONTEXT_REPLAYMOVIE
MENUITEM "Record Movie", FCEUX_CONTEXT_RECORDMOVIE
MENUITEM SEPARATOR
MENUITEM "Rewind to last auto-save", FCEUX_CONTEXT_REWINDTOLASTAUTO
MENUITEM "Screenshot", FCEUX_CONTEXT_SCREENSHOT
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Close ROM", FCEU_CONTEXT_CLOSEROM MENUITEM "Close ROM", FCEU_CONTEXT_CLOSEROM
END END
@ -342,6 +348,15 @@ BEGIN
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Help....", FCEU_CONTEXT_FCEUHELP MENUITEM "&Help....", FCEU_CONTEXT_FCEUHELP
END END
POPUP "Game+Movie+readwrite"
BEGIN
MENUITEM "Play Movie From Beginning", FCEU_CONTEXT_PLAYMOVIEFROMBEGINNING
MENUITEM "Stop Movie Recording", FCEU_CONTEXT_STOPMOVIE
MENUITEM SEPARATOR
MENUITEM "Rewind to last auto-save", FCEUX_CONTEXT_REWINDTOLASTAUTO
MENUITEM SEPARATOR
MENUITEM "Help...", FCEU_CONTEXT_MOVIEHELP
END
END END

View File

@ -606,6 +606,17 @@
#define FCEU_CONTEXT_STOPMOVIE 40296 #define FCEU_CONTEXT_STOPMOVIE 40296
#define ID_GAME_CLOSEROM 40297 #define ID_GAME_CLOSEROM 40297
#define FCEU_CONTEXT_CLOSEROM 40298 #define FCEU_CONTEXT_CLOSEROM 40298
#define ID_GAME_PLAYMOVIEFROMBEGINNING40299 40299
#define ID_GAME_STOPMOVIERECORDING 40300
#define ID_GAME_HELP40301 40301
#define ID_GAME_RECORDMOVIE 40302
#define FCEUX_CONTEXT_RECORDMOVIE 40303
#define ID_GAME_SCREENSHOT 40304
#define FCEUX_CONTEXT_SCREENSHOT 40305
#define ID_GAME_REWINDTOLASTAUTO 40306
#define FCEUX_CONTEXT_REWINDTOLASTAUTO 40307
#define ID_GAME_REWINDTOLASTAUTO40308 40308
#define ID_GAME_REWINDTOLASTAUTO40309 40309
#define IDC_DEBUGGER_ICONTRAY 55535 #define IDC_DEBUGGER_ICONTRAY 55535
#define MW_ValueLabel2 65423 #define MW_ValueLabel2 65423
#define MW_ValueLabel1 65426 #define MW_ValueLabel1 65426
@ -615,7 +626,7 @@
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 125 #define _APS_NEXT_RESOURCE_VALUE 125
#define _APS_NEXT_COMMAND_VALUE 40299 #define _APS_NEXT_COMMAND_VALUE 40310
#define _APS_NEXT_CONTROL_VALUE 1191 #define _APS_NEXT_CONTROL_VALUE 1191
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif

View File

@ -77,15 +77,15 @@ HMENU hfceuxcontext; //Handle to context menu
HMENU hfceuxcontextsub; //Handle to context sub menu HMENU hfceuxcontextsub; //Handle to context sub menu
//Extern variables------------------------------------ //Extern variables------------------------------------
extern bool movieSubtitles;
extern FCEUGI *GameInfo; extern FCEUGI *GameInfo;
extern int EnableAutosave; extern int EnableAutosave;
extern bool frameAdvanceLagSkip; extern bool frameAdvanceLagSkip;
extern bool movieSubtitles;
extern bool turbo; extern bool turbo;
extern int luaRunning; extern int luaRunning;
// Extern functions extern bool movie_readonly;
// Extern functions
char *md5_asciistr(uint8 digest[16]); char *md5_asciistr(uint8 digest[16]);
void SetAutoFirePattern(int onframes, int offframes); void SetAutoFirePattern(int onframes, int offframes);
void SetAutoFireOffset(int offset); void SetAutoFireOffset(int offset);
@ -109,7 +109,7 @@ static LONG WindowXC=1<<30,WindowYC;
int MainWindow_wndx, MainWindow_wndy; int MainWindow_wndx, MainWindow_wndy;
static uint32 mousex,mousey,mouseb; static uint32 mousex,mousey,mouseb;
static int vchanged = 0; static int vchanged = 0;
bool CommentSubtitle = false; //Toggle for comment/subtitle dialog box
//Recent Menu Strings ------------------------------------ //Recent Menu Strings ------------------------------------
char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };
const unsigned int MENU_FIRST_RECENT_FILE = 600; const unsigned int MENU_FIRST_RECENT_FILE = 600;
@ -732,10 +732,14 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
{ {
hfceuxcontext = LoadMenu(fceu_hInstance,"FCEUCONTEXTMENUS"); hfceuxcontext = LoadMenu(fceu_hInstance,"FCEUCONTEXTMENUS");
//If There is a movie loaded //If There is a movie loaded in read only
if (GameInfo && FCEUMOV_Mode(MOVIEMODE_PLAY|MOVIEMODE_RECORD)) if (GameInfo && FCEUMOV_Mode(MOVIEMODE_PLAY|MOVIEMODE_RECORD) && movie_readonly)
hfceuxcontextsub = GetSubMenu(hfceuxcontext,0); hfceuxcontextsub = GetSubMenu(hfceuxcontext,0);
//If there is a movie loaded in read+write
else if (GameInfo && FCEUMOV_Mode(MOVIEMODE_PLAY|MOVIEMODE_RECORD) && !movie_readonly)
hfceuxcontextsub = GetSubMenu(hfceuxcontext,3);
//If there is a ROM loaded but no movie //If there is a ROM loaded but no movie
else if (GameInfo) else if (GameInfo)
hfceuxcontextsub = GetSubMenu(hfceuxcontext,1); hfceuxcontextsub = GetSubMenu(hfceuxcontext,1);
@ -890,6 +894,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
break; break;
//Movie submenu //Movie submenu
case FCEUX_CONTEXT_RECORDMOVIE:
case MENU_RECORD_MOVIE: case MENU_RECORD_MOVIE:
FCEUD_MovieRecordTo(); FCEUD_MovieRecordTo();
break; break;
@ -922,6 +927,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
loggingSound = false; loggingSound = false;
break; break;
case FCEUX_CONTEXT_SCREENSHOT:
case ID_FILE_SCREENSHOT: case ID_FILE_SCREENSHOT:
FCEUI_SaveSnapshot(); FCEUI_SaveSnapshot();
break; break;
@ -1258,6 +1264,11 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
break; break;
//Context Menus------------------------------------------------------ //Context Menus------------------------------------------------------
case FCEUX_CONTEXT_REWINDTOLASTAUTO:
FCEUI_Autosave();
break;
//Movie help
case FCEU_CONTEXT_MOVIEHELP: case FCEU_CONTEXT_MOVIEHELP:
OpenHelpWindow(moviehelp); OpenHelpWindow(moviehelp);
break; break;