* Taseditor: Ctrl+Space accelerator = toggle "Auto-restore last position" checkbox

* Taseditor: remapped "Restore Playback" hotkey to Spacebar
* Taseditor: "Restore Playback" also pauses seeking
* Taseditor: mid-click = "Restore Playback" when possible
This commit is contained in:
ansstuff 2012-05-26 12:24:20 +00:00
parent 716a9c5df3
commit c6337cc8ba
5 changed files with 15 additions and 7 deletions

View File

@ -75,7 +75,7 @@ static struct
{ EMUCMD_MISC_TOGGLEFULLSCREEN, SCAN_ENTER | CMD_KEY_ALT, },
{ EMUCMD_TASEDITOR_REWIND, SCAN_BACKSPACE, },
{ EMUCMD_RERECORD_DISPLAY_TOGGLE, SCAN_M, },
{ EMUCMD_TASEDITOR_RESTORE_PLAYBACK, SCAN_ENTER | CMD_KEY_CTRL, },
{ EMUCMD_TASEDITOR_RESTORE_PLAYBACK, SCAN_SPACE, },
{ EMUCMD_TASEDITOR_CANCEL_SEEKING, SCAN_ESCAPE, },
};

View File

@ -2195,6 +2195,8 @@ BEGIN
"Q", ACCEL_CTRL_Q, VIRTKEY, CONTROL, NOINVERT
VK_RIGHT, ACCEL_CTRL_RIGHT, VIRTKEY, CONTROL, NOINVERT
"S", ACCEL_CTRL_S, VIRTKEY, CONTROL, NOINVERT
VK_INSERT, ACCEL_CTRL_SHIFT_INS, VIRTKEY, SHIFT, CONTROL, NOINVERT
"V", ACCEL_CTRL_SHIFT_V, VIRTKEY, SHIFT, CONTROL, NOINVERT
VK_UP, ACCEL_CTRL_UP, VIRTKEY, CONTROL, NOINVERT
"V", ACCEL_CTRL_V, VIRTKEY, CONTROL, NOINVERT
"W", ACCEL_CTRL_W, VIRTKEY, CONTROL, NOINVERT
@ -2210,13 +2212,12 @@ BEGIN
VK_DOWN, ACCEL_SHIFT_DOWN, VIRTKEY, SHIFT, NOINVERT
VK_END, ACCEL_SHIFT_END, VIRTKEY, SHIFT, NOINVERT
VK_HOME, ACCEL_SHIFT_HOME, VIRTKEY, SHIFT, NOINVERT
VK_INSERT, ACCEL_CTRL_SHIFT_INS, VIRTKEY, SHIFT, CONTROL, NOINVERT
VK_LEFT, ACCEL_SHIFT_LEFT, VIRTKEY, SHIFT, NOINVERT
VK_NEXT, ACCEL_SHIFT_PGDN, VIRTKEY, SHIFT, NOINVERT
VK_PRIOR, ACCEL_SHIFT_PGUP, VIRTKEY, SHIFT, NOINVERT
VK_RIGHT, ACCEL_SHIFT_RIGHT, VIRTKEY, SHIFT, NOINVERT
VK_UP, ACCEL_SHIFT_UP, VIRTKEY, SHIFT, NOINVERT
"V", ACCEL_CTRL_SHIFT_V, VIRTKEY, SHIFT, CONTROL, NOINVERT
VK_SPACE, ACCEL_CTRL_SPACE, VIRTKEY, CONTROL, NOINVERT
END
IDR_RWACCELERATOR ACCELERATORS

View File

@ -1011,6 +1011,8 @@
#define ID_CONFIG_AUTOPAUSEATTHEENDOFMOVIE 40559
#define ID_SELECTED_SETMARKERS 40560
#define ID_SELECTED_REMOVEMARKERS 40561
#define ACCEL_CTRL_SPACEBAR 40563
#define ACCEL_CTRL_SPACE 40563
#define IDC_DEBUGGER_ICONTRAY 55535
#define MW_ValueLabel2 65423
#define MW_ValueLabel1 65426
@ -1020,7 +1022,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 206
#define _APS_NEXT_COMMAND_VALUE 40563
#define _APS_NEXT_COMMAND_VALUE 40564
#define _APS_NEXT_CONTROL_VALUE 1281
#define _APS_NEXT_SYMED_VALUE 101
#endif

View File

@ -274,7 +274,12 @@ void PLAYBACK::UnpauseEmulation()
void PLAYBACK::RestorePosition()
{
if (lost_position_frame && lost_position_frame > currFrameCounter + 1)
SeekingStart(lost_position_frame);
{
if (emu_paused)
SeekingStart(lost_position_frame);
else
PauseEmulation();
}
}
void PLAYBACK::MiddleButtonClick()
{
@ -299,9 +304,8 @@ void PLAYBACK::MiddleButtonClick()
int selection_beginning = selection.GetCurrentSelectionBeginning();
if (selection_beginning > currFrameCounter)
SeekingStart(selection_beginning + 1);
} else if (GetAsyncKeyState(VK_MENU) < 0)
} else if (lost_position_frame && lost_position_frame > currFrameCounter + 1) // (GetAsyncKeyState(VK_MENU) < 0)
{
// if Alt is held, Restore Playback
RestorePosition();
} else
{

View File

@ -1048,6 +1048,7 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
taseditor_window.UpdateCheckedItems();
break;
case CHECK_AUTORESTORE_PLAYBACK:
case ACCEL_CTRL_SPACE:
taseditor_config.restore_position ^= 1;
taseditor_window.UpdateCheckedItems();
break;