From cc09e4dad13220ea80d42d57ac19ba4d5538efba Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 24 Feb 2010 10:04:55 +0000 Subject: [PATCH] GTK: restructured movie menus; added some options --- src/drivers/sdl/gui.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/drivers/sdl/gui.cpp b/src/drivers/sdl/gui.cpp index 24197367..3246b7e8 100644 --- a/src/drivers/sdl/gui.cpp +++ b/src/drivers/sdl/gui.cpp @@ -749,8 +749,15 @@ void enableFullscreen () { ToggleFS(); } - -void recordMovie () +void recordMovie() +{ + char* movie_fname = const_cast(FCEU_MakeFName(FCEUMKF_MOVIE, 0, 0).c_str()); + FCEUI_printf("Recording movie to %s\n", movie_fname); + FCEUI_SaveMovie(movie_fname, MOVIE_FLAG_NONE, L""); + + return; +} +void recordMovieAs () { GtkWidget* fileChooser; @@ -1015,10 +1022,6 @@ static GtkItemFactoryEntry menu_items[] = { #ifdef _S9XLUA_H { "/File/Load _Lua Script", NULL, loadLua, 0, ""}, #endif - { "/File/sep2", NULL, NULL, 0, "" }, - { "/File/Load _Movie", NULL, loadMovie, 0, ""}, - { "/File/Stop Movie", NULL, FCEUI_StopMovie, 0, ""}, - { "/File/_Record Movie", NULL, recordMovie, 0, ""}, { "/File/sep3", NULL, NULL, 0, "" }, { "/File/_Screenshot", "F12", FCEUI_SaveSnapshot, 0, ""}, { "/File/sep2", NULL, NULL, 0, "" }, @@ -1032,6 +1035,14 @@ static GtkItemFactoryEntry menu_items[] = { { "/Emulator/_FDS/_Switch Disk", NULL, FCEU_FDSSelect, 0, ""}, { "/Emulator/_FDS/_Eject Disk", NULL, FCEU_FDSInsert, 0, ""}, { "/Emulator/_FDS/Load _BIOS File", NULL, loadFdsBios, 0, ""}, + { "/_Movie", NULL, NULL, 0, "" }, + { "/Movie/_Open", NULL, loadMovie, 0, ""}, + { "/Movie/S_top", NULL, FCEUI_StopMovie, 0, ""}, + { "/Movie/_Pause", NULL, emuPause, 0, ""}, + { "/Movie/R_esume", NULL, emuResume, 0, ""}, + { "/Movie/sep2", NULL, NULL, 0, "" }, + { "/Movie/_Record", NULL, recordMovie, 0, ""}, + { "/Movie/Record _as", NULL, recordMovieAs, 0, ""}, { "/Options/_Gamepad Config", NULL , openGamepadConfig, 0, "", GTK_STOCK_PREFERENCES }, { "/Options/_Sound Config", NULL , openSoundConfig, 0, "" }, { "/Options/_Vound Config", NULL , openVideoConfig, 0, "" }, @@ -1039,7 +1050,7 @@ static GtkItemFactoryEntry menu_items[] = { { "/Options/sep1", NULL, NULL, 0, "" }, { "/Options/_Fullscreen", NULL, enableFullscreen, 0, "" }, { "/_Help", NULL, NULL, 0, "" }, - { "/_Help/About", NULL, showAbout, 0, "" }, + { "/Help/About", NULL, showAbout, 0, "" }, }; static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);