From 8640e4e9708096cc12a8b0b81a2dda90a35ec685 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 9 Dec 2008 06:06:11 +0000 Subject: [PATCH] Win32 - more context menu items --- src/drivers/win/res.rc | 5 +++++ src/drivers/win/resource.h | 8 +++++++- src/drivers/win/window.cpp | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index d4b56bfc..ad06b454 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -326,6 +326,9 @@ FCEUCONTEXTMENUS MENU BEGIN POPUP "Game+Movie" BEGIN + MENUITEM "Play Movie from Beginning", FCEU_CONTEXT_PLAYMOVIEFROMBEGINNING + MENUITEM "Stop Movie", FCEU_CONTEXT_STOPMOVIE + MENUITEM SEPARATOR MENUITEM "Insert Subtitle", FCEU_CONTEXT_INSERTSUBTITLE MENUITEM "Insert Comment", FCEU_CONTEXT_INSERTCOMMENT MENUITEM SEPARATOR @@ -334,6 +337,8 @@ BEGIN POPUP "Game+NoMovie" BEGIN MENUITEM "&Replay Movie", FCEUX_CONTEXT_REPLAYMOVIE + MENUITEM SEPARATOR + MENUITEM "Close ROM", FCEU_CONTEXT_CLOSEROM END POPUP "NoGame" BEGIN diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index 47c0df53..9a2ff9d3 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -600,6 +600,12 @@ #define ID_FILE_RECORDAVI 40290 #define ID_FILE_LUA 40291 #define ID_NES_EMULATION 40292 +#define ID_GAME_PLAYMOVIEFROMBEGINNING 40293 +#define ID_GAME_STOPMOVIE 40294 +#define FCEU_CONTEXT_PLAYMOVIEFROMBEGINNING 40295 +#define FCEU_CONTEXT_STOPMOVIE 40296 +#define ID_GAME_CLOSEROM 40297 +#define FCEU_CONTEXT_CLOSEROM 40298 #define IDC_DEBUGGER_ICONTRAY 55535 #define MW_ValueLabel2 65423 #define MW_ValueLabel1 65426 @@ -609,7 +615,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 125 -#define _APS_NEXT_COMMAND_VALUE 40293 +#define _APS_NEXT_COMMAND_VALUE 40299 #define _APS_NEXT_CONTROL_VALUE 1191 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index f55400dc..c4e9a6fa 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -880,6 +880,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) case MENU_OPEN_FILE: LoadNewGamey(hWnd, 0); break; + case FCEU_CONTEXT_CLOSEROM: case MENU_CLOSE_FILE: CloseGame(); break; @@ -899,9 +900,11 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) // Replay movie menu was selected FCEUD_MovieReplayFrom(); break; + case FCEU_CONTEXT_STOPMOVIE: case MENU_STOP_MOVIE: FCEUI_StopMovie(); break; + case FCEU_CONTEXT_PLAYMOVIEFROMBEGINNING: case ID_FILE_PLAYMOVIEFROMBEGINNING: FCEUI_MoviePlayFromBeginning(); break;