Skip to content

Commit

Permalink
Moved A/V recording shortucuts to File menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
punesemu committed Dec 28, 2020
1 parent 6c4a970 commit efe5cec
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
6 changes: 3 additions & 3 deletions src/gui/designer/mainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<addaction name="separator"/>
<addaction name="action_Apply_Patch"/>
<addaction name="separator"/>
<addaction name="action_Start_Stop_Audio_recording"/>
<addaction name="action_Start_Stop_Video_recording"/>
<addaction name="separator"/>
<addaction name="action_Open_working_folder"/>
<addaction name="separator"/>
<addaction name="action_Quit"/>
Expand Down Expand Up @@ -83,9 +86,6 @@
<addaction name="menu_Disk_Side"/>
<addaction name="action_Eject_Insert_Disk"/>
<addaction name="separator"/>
<addaction name="action_Start_Stop_Audio_recording"/>
<addaction name="action_Start_Stop_Video_recording"/>
<addaction name="separator"/>
<addaction name="action_Fullscreen"/>
<addaction name="action_Save_Screenshot"/>
<addaction name="action_Save_Unaltered_NES_screen"/>
Expand Down
39 changes: 20 additions & 19 deletions src/gui/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ void mainWindow::make_reset(int type) {

emu_thread_continue();

update_menu_file();
// dopo un reset la pause e' automaticamente disabilitata quindi faccio
// un aggiornamento del submenu NES per avere la voce correttamente settata.
update_menu_nes();
Expand Down Expand Up @@ -501,6 +502,10 @@ void mainWindow::shortcuts(void) {

// File
connect_shortcut(action_Open, SET_INP_SC_OPEN, SLOT(s_open()));
connect_shortcut(action_Start_Stop_Audio_recording, SET_INP_SC_REC_AUDIO, SLOT(s_start_stop_audio_recording()));
#if defined (WITH_FFMPEG)
connect_shortcut(action_Start_Stop_Video_recording, SET_INP_SC_REC_VIDEO, SLOT(s_start_stop_video_recording()));
#endif
connect_shortcut(action_Quit, SET_INP_SC_QUIT, SLOT(s_quit()));
// NES
connect_shortcut(action_Turn_Off, SET_INP_SC_TURN_OFF, SLOT(s_turn_on_off()));
Expand All @@ -509,10 +514,6 @@ void mainWindow::shortcuts(void) {
connect_shortcut(action_Insert_Coin, SET_INP_SC_INSERT_COIN, SLOT(s_insert_coin()));
connect_shortcut(action_Switch_sides, SET_INP_SC_SWITCH_SIDES, SLOT(s_disk_side()));
connect_shortcut(action_Eject_Insert_Disk, SET_INP_SC_EJECT_DISK, SLOT(s_eject_disk()));
connect_shortcut(action_Start_Stop_Audio_recording, SET_INP_SC_REC_AUDIO, SLOT(s_start_stop_audio_recording()));
#if defined (WITH_FFMPEG)
connect_shortcut(action_Start_Stop_Video_recording, SET_INP_SC_REC_VIDEO, SLOT(s_start_stop_video_recording()));
#endif
connect_shortcut(action_Fullscreen, SET_INP_SC_FULLSCREEN, SLOT(s_set_fullscreen()));
connect_shortcut(action_Save_Screenshot, SET_INP_SC_SCREENSHOT, SLOT(s_save_screenshot()));
connect_shortcut(action_Save_Unaltered_NES_screen, SET_INP_SC_SCREENSHOT_1X, SLOT(s_save_screenshot_1x()));
Expand Down Expand Up @@ -616,6 +617,10 @@ void mainWindow::connect_menu_signals(void) {
// File
connect_action(action_Open, SLOT(s_open()));
connect_action(action_Apply_Patch, SLOT(s_apply_patch()));
connect_action(action_Start_Stop_Audio_recording, SLOT(s_start_stop_audio_recording()));
#if defined (WITH_FFMPEG)
connect_action(action_Start_Stop_Video_recording, SLOT(s_start_stop_video_recording()));
#endif
connect_action(action_Open_working_folder, SLOT(s_open_working_folder()));
connect_action(action_Quit, SLOT(s_quit()));
// NES
Expand All @@ -633,10 +638,6 @@ void mainWindow::connect_menu_signals(void) {
connect_action(action_Disk_4_side_B, 7, SLOT(s_disk_side()));
connect_action(action_Switch_sides, 0xFFF, SLOT(s_disk_side()));
connect_action(action_Eject_Insert_Disk, SLOT(s_eject_disk()));
connect_action(action_Start_Stop_Audio_recording, SLOT(s_start_stop_audio_recording()));
#if defined (WITH_FFMPEG)
connect_action(action_Start_Stop_Video_recording, SLOT(s_start_stop_video_recording()));
#endif
connect_action(action_Fullscreen, SLOT(s_set_fullscreen()));
connect_action(action_Save_Screenshot, SLOT(s_save_screenshot()));
connect_action(action_Save_Unaltered_NES_screen, SLOT(s_save_screenshot_1x()));
Expand Down Expand Up @@ -755,6 +756,8 @@ void mainWindow::update_menu_file(void) {
action_Apply_Patch->setEnabled(true);
}

update_recording_widgets();

// recent roms
if (recent_roms_count() > 0) {
int i;
Expand Down Expand Up @@ -848,8 +851,6 @@ void mainWindow::update_menu_nes(void) {
action_Eject_Insert_Disk->setEnabled(false);
}

update_recording_widgets();

if ((info.pause_from_gui == TRUE) && (rwnd.active == FALSE)) {
action_Pause->setChecked(true);
} else {
Expand Down Expand Up @@ -1254,7 +1255,7 @@ void mainWindow::s_start_stop_audio_recording(void) {
} else {
wave_close();
}
update_menu_nes();
update_menu_file();
#endif
}
#if defined (WITH_FFMPEG)
Expand Down Expand Up @@ -1533,6 +1534,14 @@ void mainWindow::s_shcjoy_read_timer(void) {
case SET_INP_SC_OPEN:
action_Open->trigger();
break;
case SET_INP_SC_REC_AUDIO:
action_Start_Stop_Audio_recording->trigger();
break;
#if defined (WITH_FFMPEG)
case SET_INP_SC_REC_VIDEO:
action_Start_Stop_Video_recording->trigger();
break;
#endif
case SET_INP_SC_QUIT:
action_Quit->trigger();
break;
Expand All @@ -1554,14 +1563,6 @@ void mainWindow::s_shcjoy_read_timer(void) {
case SET_INP_SC_EJECT_DISK:
action_Eject_Insert_Disk->trigger();
break;
case SET_INP_SC_REC_AUDIO:
action_Start_Stop_Audio_recording->trigger();
break;
#if defined (WITH_FFMPEG)
case SET_INP_SC_REC_VIDEO:
action_Start_Stop_Video_recording->trigger();
break;
#endif
case SET_INP_SC_FULLSCREEN:
action_Fullscreen->trigger();
break;
Expand Down
8 changes: 4 additions & 4 deletions src/gui/wdgSettingsInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,17 +757,17 @@ void wdgSettingsInput::shortcuts_set(void) {
}

shortcut_update_text(mainwin->action_Open, SET_INP_SC_OPEN);
shortcut_update_text(mainwin->action_Start_Stop_Audio_recording, SET_INP_SC_REC_AUDIO);
#if defined (WITH_FFMPEG)
shortcut_update_text(mainwin->action_Start_Stop_Video_recording, SET_INP_SC_REC_VIDEO);
#endif
shortcut_update_text(mainwin->action_Quit, SET_INP_SC_QUIT);
shortcut_update_text(mainwin->action_Turn_Off, SET_INP_SC_TURN_OFF);
shortcut_update_text(mainwin->action_Hard_Reset, SET_INP_SC_HARD_RESET);
shortcut_update_text(mainwin->action_Soft_Reset, SET_INP_SC_SOFT_RESET);
shortcut_update_text(mainwin->action_Insert_Coin, SET_INP_SC_INSERT_COIN);
shortcut_update_text(mainwin->action_Switch_sides, SET_INP_SC_SWITCH_SIDES);
shortcut_update_text(mainwin->action_Eject_Insert_Disk, SET_INP_SC_EJECT_DISK);
shortcut_update_text(mainwin->action_Start_Stop_Audio_recording, SET_INP_SC_REC_AUDIO);
#if defined (WITH_FFMPEG)
shortcut_update_text(mainwin->action_Start_Stop_Video_recording, SET_INP_SC_REC_VIDEO);
#endif
shortcut_update_text(mainwin->action_Fullscreen, SET_INP_SC_FULLSCREEN);
shortcut_update_text(mainwin->action_Save_Screenshot, SET_INP_SC_SCREENSHOT);
shortcut_update_text(mainwin->action_Save_Unaltered_NES_screen, SET_INP_SC_SCREENSHOT_1X);
Expand Down

0 comments on commit efe5cec

Please sign in to comment.