* Taseditor: a couple of bugfixes
* Taseditor: force finishing click at buttondown
This commit is contained in:
parent
3ae6096048
commit
704af09cc8
|
@ -288,7 +288,7 @@ BEGIN
|
|||
MENUITEM "Use Input keys for Column Set", ID_CONFIG_USEINPUTKEYSFORCOLUMNSET,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "Allow keyboard controls in Piano Roll", ID_CONFIG_KEYBOARDCONTROLSINPIANOROLL,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "Superimpose affects copy/paste", ID_CONFIG_SUPERIMPOSE_AFFECTS_PASTE,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "ColumnSet Pattern skips Lag", ID_CONFIG_COLUMNSETPATTERNSKIPSLAG,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "Autofire Pattern skips Lag", ID_CONFIG_COLUMNSETPATTERNSKIPSLAG,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM MFT_SEPARATOR
|
||||
MENUITEM "Silent Autosave", ID_CONFIG_SILENTAUTOSAVE,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "Mute Turbo", ID_CONFIG_MUTETURBO,MFT_STRING,MFS_ENABLED
|
||||
|
|
|
@ -15,7 +15,7 @@ Greenzone - Access zone
|
|||
* saves and loads the data from a project file. On error: truncates Greenzone to last successfully read savestate
|
||||
* regularly checks if there's a savestate of current emulation state, if there's no such savestate in array then creates one and updates lag info for previous frame
|
||||
* regularly runs gradual cleaning of the savestates array (for memory saving), deleting oldest savestates
|
||||
* on demand: (when movie input was changed) truncates the size of Greenzone, óäàëÿÿ ñýéâû, deleting savestates that became irrelevant because of new input. After truncating it may also move Playback cursor (which must always reside within Greenzone) and may launch Playback seeking
|
||||
* on demand: (when movie input was changed) truncates the size of Greenzone, deleting savestates that became irrelevant because of new input. After truncating it may also move Playback cursor (which must always reside within Greenzone) and may launch Playback seeking
|
||||
* stores resources: save id, properties of gradual cleaning, timing of cleaning
|
||||
------------------------------------------------------------------------------------ */
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#define EVERY4TH 0xFFFFFFFC
|
||||
#define EVERY2ND 0xFFFFFFFE
|
||||
|
||||
#define PROGRESSBAR_UPDATE_RATE 1000 // progressbar is updated after every 1000 savestates loaded from fm3
|
||||
|
||||
class GREENZONE
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -187,6 +187,7 @@ void PIANO_ROLL::init()
|
|||
}
|
||||
void PIANO_ROLL::free()
|
||||
{
|
||||
auto_mouseup_timer = 0;
|
||||
if (hMainListFont)
|
||||
{
|
||||
DeleteObject(hMainListFont);
|
||||
|
@ -221,6 +222,7 @@ void PIANO_ROLL::free()
|
|||
}
|
||||
void PIANO_ROLL::reset()
|
||||
{
|
||||
auto_mouseup_timer = 0;
|
||||
next_header_update_time = header_item_under_mouse = 0;
|
||||
// delete all columns except 0th
|
||||
while (ListView_DeleteColumn(hwndList, 1)) {}
|
||||
|
@ -1060,6 +1062,12 @@ LRESULT APIENTRY ListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
return 0;
|
||||
break;
|
||||
}
|
||||
case WM_TIMER:
|
||||
// very hacky way to force exit from modal message loop used by ListView's WM_LBUTTONDOWN handler
|
||||
if (piano_roll.auto_mouseup_timer)
|
||||
PostMessage(hWnd, WM_LBUTTONUP, 0, 0);
|
||||
// also disable timer of entering edit mode (there's no edit mode anyway)
|
||||
return 0;
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_LBUTTONDBLCLK:
|
||||
{
|
||||
|
@ -1100,23 +1108,43 @@ LRESULT APIENTRY ListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
history.RegisterMarkersChange(MODTYPE_MARKER_UNSET, row_index);
|
||||
piano_roll.RedrawRow(row_index);
|
||||
}
|
||||
// also select the row
|
||||
// also select the row by calling hwndList_oldWndProc
|
||||
// WARNING: incredible hack incoming!
|
||||
// This allows to intercept normal behaviour of ListView while still using it for setting selection
|
||||
// very hacky way to force exit from modal message loop used by ListView's WM_LBUTTONDOWN handler
|
||||
piano_roll.auto_mouseup_timer = SetTimer(0, 0, TIME_TO_GENERATE_AUTO_MOUSEUP, 0);
|
||||
CallWindowProc(hwndList_oldWndProc, hWnd, msg, wParam, lParam);
|
||||
KillTimer(0, piano_roll.auto_mouseup_timer);
|
||||
piano_roll.auto_mouseup_timer = 0;
|
||||
}
|
||||
} else if(column_index >= COLUMN_JOYPAD1_A && column_index <= COLUMN_JOYPAD4_R)
|
||||
{
|
||||
// clicked on input
|
||||
// first call old wndproc to set selection on the row
|
||||
if (alt_pressed)
|
||||
wParam |= MK_SHIFT; // Alt should select region, just like Shift
|
||||
// WARNING: incredible hack incoming!
|
||||
// This allows to intercept normal behaviour of ListView while still using it for setting selection
|
||||
if (msg == WM_LBUTTONDOWN)
|
||||
{
|
||||
// very hacky way to force exit from modal message loop used by ListView's WM_LBUTTONDOWN handler
|
||||
piano_roll.auto_mouseup_timer = SetTimer(0, 0, TIME_TO_GENERATE_AUTO_MOUSEUP, 0);
|
||||
CallWindowProc(hwndList_oldWndProc, hWnd, msg, wParam, lParam);
|
||||
KillTimer(0, piano_roll.auto_mouseup_timer);
|
||||
piano_roll.auto_mouseup_timer = 0;
|
||||
// ehh... normally we should not even call oldWndProc with WM_LBUTTONDOWN, but we need it for setting selection
|
||||
} else
|
||||
{
|
||||
// as for WM_LBUTTONDBLCLK, it won't freeze the window, so no need for hacks with SetTimer
|
||||
CallWindowProc(hwndList_oldWndProc, hWnd, msg, wParam, lParam);
|
||||
}
|
||||
if (alt_pressed)
|
||||
{
|
||||
// Alt should select region, just like Shift
|
||||
CallWindowProc(hwndList_oldWndProc, hWnd, msg, wParam|MK_SHIFT, lParam);
|
||||
int joy = (column_index - COLUMN_JOYPAD1_A) / NUM_JOYPAD_BUTTONS;
|
||||
int button = (column_index - COLUMN_JOYPAD1_A) % NUM_JOYPAD_BUTTONS;
|
||||
piano_roll.InputColumnSetPattern(joy, button);
|
||||
} else
|
||||
{
|
||||
CallWindowProc(hwndList_oldWndProc, hWnd, msg, wParam, lParam);
|
||||
piano_roll.ToggleJoypadBit(column_index, row_index, GET_KEYSTATE_WPARAM(wParam));
|
||||
}
|
||||
}
|
||||
|
@ -1158,7 +1186,14 @@ LRESULT APIENTRY ListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
zDelta *= BOOST_WHEN_BOTH_RIGHTBUTTON_AND_ALT_PRESSED;
|
||||
int destination_frame = currFrameCounter - (zDelta / 120);
|
||||
if (destination_frame < 0) destination_frame = 0;
|
||||
int lastCursor = currFrameCounter;
|
||||
playback.jump(destination_frame);
|
||||
if (lastCursor != currFrameCounter)
|
||||
{
|
||||
// redraw row where Playback cursor was (in case there's two or more WM_MOUSEWHEEL messages before playback.update())
|
||||
piano_roll.RedrawRow(lastCursor);
|
||||
bookmarks.RedrawChangedBookmarks(lastCursor);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define HEADER_DX_FIX 4
|
||||
|
||||
#define BOOST_WHEN_BOTH_RIGHTBUTTON_AND_ALT_PRESSED 2
|
||||
#define TIME_TO_GENERATE_AUTO_MOUSEUP 20 // in milliseconds
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -162,6 +163,9 @@ public:
|
|||
HFONT hMainListFont, hMainListSelectFont, hMarkersFont, hMarkersEditFont;
|
||||
HBRUSH bg_brush;
|
||||
|
||||
// very hacky way to force exit from modal message loop used by ListView's WM_LBUTTONDOWN handler
|
||||
UINT_PTR auto_mouseup_timer;
|
||||
|
||||
private:
|
||||
void CenterListAt(int frame);
|
||||
|
||||
|
@ -170,4 +174,5 @@ private:
|
|||
int next_header_update_time;
|
||||
|
||||
HMENU hrmenu;
|
||||
|
||||
};
|
||||
|
|
|
@ -80,91 +80,6 @@ void PLAYBACK::reset()
|
|||
}
|
||||
void PLAYBACK::update()
|
||||
{
|
||||
jump_was_used_this_frame = false;
|
||||
|
||||
// forget lost_position_frame when the position is restored
|
||||
if (currFrameCounter + 1 == lost_position_frame)
|
||||
lost_position_frame = 0;
|
||||
|
||||
// pause when seeking hit pause_frame
|
||||
if(!FCEUI_EmulationPaused())
|
||||
if(pause_frame && pause_frame <= currFrameCounter + 1)
|
||||
SeekingStop();
|
||||
|
||||
// update flashing pauseframe
|
||||
if (old_pauseframe != pause_frame && old_pauseframe)
|
||||
{
|
||||
// pause_frame was changed, clear old_pauseframe gfx
|
||||
piano_roll.RedrawRow(old_pauseframe-1);
|
||||
bookmarks.RedrawChangedBookmarks(old_pauseframe-1);
|
||||
}
|
||||
old_pauseframe = pause_frame;
|
||||
old_show_pauseframe = show_pauseframe;
|
||||
if (pause_frame)
|
||||
{
|
||||
if (emu_paused)
|
||||
show_pauseframe = (int)(clock() / PAUSEFRAME_BLINKING_PERIOD_PAUSED) & 1;
|
||||
else
|
||||
show_pauseframe = (int)(clock() / PAUSEFRAME_BLINKING_PERIOD_SEEKING) & 1;
|
||||
} else show_pauseframe = false;
|
||||
if (old_show_pauseframe != show_pauseframe)
|
||||
{
|
||||
// update pauseframe gfx
|
||||
piano_roll.RedrawRow(pause_frame-1);
|
||||
bookmarks.RedrawChangedBookmarks(pause_frame-1);
|
||||
}
|
||||
|
||||
// update seeking progressbar
|
||||
old_emu_paused = emu_paused;
|
||||
emu_paused = (FCEUI_EmulationPaused() != 0);
|
||||
if (pause_frame)
|
||||
{
|
||||
if (old_show_pauseframe != show_pauseframe)
|
||||
SetProgressbar(currFrameCounter - seeking_start_frame, pause_frame - seeking_start_frame);
|
||||
} else if (old_emu_paused != emu_paused)
|
||||
{
|
||||
// emulator got paused/unpaused externally
|
||||
if (old_emu_paused && !emu_paused)
|
||||
// externally unpaused - progressbar should be empty
|
||||
SetProgressbar(0, 1);
|
||||
else
|
||||
// externally paused - progressbar should be full
|
||||
SetProgressbar(1, 1);
|
||||
}
|
||||
|
||||
// update the playback cursor
|
||||
if(currFrameCounter != lastCursor)
|
||||
{
|
||||
piano_roll.FollowPlaybackIfNeeded();
|
||||
// update gfx of the old and new rows
|
||||
piano_roll.RedrawRow(lastCursor);
|
||||
bookmarks.RedrawChangedBookmarks(lastCursor);
|
||||
piano_roll.RedrawRow(currFrameCounter);
|
||||
bookmarks.RedrawChangedBookmarks(currFrameCounter);
|
||||
lastCursor = currFrameCounter;
|
||||
if (!turbo)
|
||||
// enforce redrawing now
|
||||
UpdateWindow(piano_roll.hwndList);
|
||||
// lazy update of "Playback's Marker text"
|
||||
int current_marker = markers_manager.GetMarkerUp(currFrameCounter);
|
||||
if (shown_marker != current_marker)
|
||||
{
|
||||
markers_manager.UpdateMarkerNote();
|
||||
shown_marker = current_marker;
|
||||
RedrawMarker();
|
||||
must_find_current_marker = false;
|
||||
}
|
||||
}
|
||||
|
||||
// [non-lazy] update "Playback's Marker text" if needed
|
||||
if (must_find_current_marker)
|
||||
{
|
||||
markers_manager.UpdateMarkerNote();
|
||||
shown_marker = markers_manager.GetMarkerUp(currFrameCounter);
|
||||
RedrawMarker();
|
||||
must_find_current_marker = false;
|
||||
}
|
||||
|
||||
// update < and > buttons
|
||||
old_rewind_button_state = rewind_button_state;
|
||||
rewind_button_state = ((Button_GetState(hwndRewind) & BST_PUSHED) != 0 || Taseditor_rewind_now);
|
||||
|
@ -220,6 +135,88 @@ void PLAYBACK::update()
|
|||
}
|
||||
}
|
||||
|
||||
// forget lost_position_frame when the position is restored
|
||||
if (currFrameCounter + 1 == lost_position_frame)
|
||||
lost_position_frame = 0;
|
||||
|
||||
// pause when seeking hit pause_frame
|
||||
if(!FCEUI_EmulationPaused())
|
||||
if(pause_frame && pause_frame <= currFrameCounter + 1)
|
||||
SeekingStop();
|
||||
|
||||
// update flashing pauseframe
|
||||
if (old_pauseframe != pause_frame && old_pauseframe)
|
||||
{
|
||||
// pause_frame was changed, clear old_pauseframe gfx
|
||||
piano_roll.RedrawRow(old_pauseframe-1);
|
||||
bookmarks.RedrawChangedBookmarks(old_pauseframe-1);
|
||||
}
|
||||
old_pauseframe = pause_frame;
|
||||
old_show_pauseframe = show_pauseframe;
|
||||
if (pause_frame)
|
||||
{
|
||||
if (emu_paused)
|
||||
show_pauseframe = (int)(clock() / PAUSEFRAME_BLINKING_PERIOD_PAUSED) & 1;
|
||||
else
|
||||
show_pauseframe = (int)(clock() / PAUSEFRAME_BLINKING_PERIOD_SEEKING) & 1;
|
||||
} else show_pauseframe = false;
|
||||
if (old_show_pauseframe != show_pauseframe)
|
||||
{
|
||||
// update pauseframe gfx
|
||||
piano_roll.RedrawRow(pause_frame-1);
|
||||
bookmarks.RedrawChangedBookmarks(pause_frame-1);
|
||||
}
|
||||
|
||||
// update seeking progressbar
|
||||
old_emu_paused = emu_paused;
|
||||
emu_paused = (FCEUI_EmulationPaused() != 0);
|
||||
if (pause_frame)
|
||||
{
|
||||
if (old_show_pauseframe != show_pauseframe)
|
||||
SetProgressbar(currFrameCounter - seeking_start_frame, pause_frame - seeking_start_frame);
|
||||
} else if (old_emu_paused != emu_paused)
|
||||
{
|
||||
// emulator got paused/unpaused externally
|
||||
if (old_emu_paused && !emu_paused)
|
||||
// externally unpaused - progressbar should be empty
|
||||
SetProgressbar(0, 1);
|
||||
else
|
||||
// externally paused - progressbar should be full
|
||||
SetProgressbar(1, 1);
|
||||
}
|
||||
|
||||
// update the playback cursor
|
||||
if(currFrameCounter != lastCursor)
|
||||
{
|
||||
// update gfx of the old and new rows
|
||||
piano_roll.RedrawRow(lastCursor);
|
||||
bookmarks.RedrawChangedBookmarks(lastCursor);
|
||||
piano_roll.RedrawRow(currFrameCounter);
|
||||
bookmarks.RedrawChangedBookmarks(currFrameCounter);
|
||||
lastCursor = currFrameCounter;
|
||||
piano_roll.FollowPlaybackIfNeeded();
|
||||
if (!turbo)
|
||||
// enforce redrawing now
|
||||
UpdateWindow(piano_roll.hwndList);
|
||||
// lazy update of "Playback's Marker text"
|
||||
int current_marker = markers_manager.GetMarkerUp(currFrameCounter);
|
||||
if (shown_marker != current_marker)
|
||||
{
|
||||
markers_manager.UpdateMarkerNote();
|
||||
shown_marker = current_marker;
|
||||
RedrawMarker();
|
||||
must_find_current_marker = false;
|
||||
}
|
||||
}
|
||||
|
||||
// [non-lazy] update "Playback's Marker text" if needed
|
||||
if (must_find_current_marker)
|
||||
{
|
||||
markers_manager.UpdateMarkerNote();
|
||||
shown_marker = markers_manager.GetMarkerUp(currFrameCounter);
|
||||
RedrawMarker();
|
||||
must_find_current_marker = false;
|
||||
}
|
||||
}
|
||||
|
||||
void PLAYBACK::updateProgressbar()
|
||||
|
@ -311,41 +308,47 @@ void PLAYBACK::ForwardFrame()
|
|||
}
|
||||
void PLAYBACK::RewindFull(int speed)
|
||||
{
|
||||
if (!jump_was_used_this_frame)
|
||||
int index = currFrameCounter - 1;
|
||||
// jump trough "speed" amount of previous markers
|
||||
while (speed > 0)
|
||||
{
|
||||
int index = currFrameCounter - 1;
|
||||
// jump trough "speed" amount of previous markers
|
||||
while (speed > 0)
|
||||
{
|
||||
for (; index >= 0; index--)
|
||||
if (markers_manager.GetMarker(index)) break;
|
||||
speed--;
|
||||
}
|
||||
if (index >= 0)
|
||||
jump(index);
|
||||
else
|
||||
jump(0);
|
||||
jump_was_used_this_frame = true;
|
||||
for (; index >= 0; index--)
|
||||
if (markers_manager.GetMarker(index)) break;
|
||||
speed--;
|
||||
}
|
||||
int lastCursor = currFrameCounter;
|
||||
if (index >= 0)
|
||||
jump(index);
|
||||
else
|
||||
jump(0);
|
||||
if (lastCursor != currFrameCounter)
|
||||
{
|
||||
// redraw row where Playback cursor was (in case there's two or more RewindFulls before playback.update())
|
||||
piano_roll.RedrawRow(lastCursor);
|
||||
bookmarks.RedrawChangedBookmarks(lastCursor);
|
||||
}
|
||||
}
|
||||
void PLAYBACK::ForwardFull(int speed)
|
||||
{
|
||||
if (!jump_was_used_this_frame)
|
||||
int last_frame = currMovieData.getNumRecords()-1;
|
||||
int index = currFrameCounter + 1;
|
||||
// jump trough "speed" amount of next markers
|
||||
while (speed > 0)
|
||||
{
|
||||
int last_frame = currMovieData.getNumRecords()-1;
|
||||
int index = currFrameCounter + 1;
|
||||
// jump trough "speed" amount of next markers
|
||||
while (speed > 0)
|
||||
{
|
||||
for (; index <= last_frame; ++index)
|
||||
if (markers_manager.GetMarker(index)) break;
|
||||
speed--;
|
||||
}
|
||||
if (index <= last_frame)
|
||||
jump(index);
|
||||
else
|
||||
jump(last_frame);
|
||||
jump_was_used_this_frame = true;
|
||||
for (; index <= last_frame; ++index)
|
||||
if (markers_manager.GetMarker(index)) break;
|
||||
speed--;
|
||||
}
|
||||
int lastCursor = currFrameCounter;
|
||||
if (index <= last_frame)
|
||||
jump(index);
|
||||
else
|
||||
jump(last_frame);
|
||||
if (lastCursor != currFrameCounter)
|
||||
{
|
||||
// redraw row where Playback cursor was (in case there's two or more ForwardFulls before playback.update())
|
||||
piano_roll.RedrawRow(lastCursor);
|
||||
bookmarks.RedrawChangedBookmarks(lastCursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,4 @@ private:
|
|||
int button_hold_time;
|
||||
int seeking_start_frame;
|
||||
|
||||
// temps
|
||||
bool jump_was_used_this_frame;
|
||||
|
||||
};
|
||||
|
|
|
@ -417,7 +417,7 @@ void SELECTION::ClearSelection()
|
|||
}
|
||||
void SELECTION::ClearRowSelection(int index)
|
||||
{
|
||||
ListView_SetItemState(piano_roll.hwndList, index, 0, LVIS_SELECTED);
|
||||
ListView_SetItemState(piano_roll.hwndList, index, 0, LVIS_FOCUSED|LVIS_SELECTED);
|
||||
}
|
||||
|
||||
void SELECTION::EnforceSelectionToList()
|
||||
|
@ -442,7 +442,7 @@ void SELECTION::SetRowSelection(int index)
|
|||
void SELECTION::SetRegionSelection(int start, int end)
|
||||
{
|
||||
for (int i = start; i <= end; ++i)
|
||||
ListView_SetItemState(piano_roll.hwndList, i, LVIS_FOCUSED|LVIS_SELECTED, LVIS_FOCUSED|LVIS_SELECTED);
|
||||
ListView_SetItemState(piano_roll.hwndList, i, LVIS_SELECTED, LVIS_SELECTED);
|
||||
}
|
||||
void SELECTION::SelectBetweenMarkers()
|
||||
{
|
||||
|
@ -465,8 +465,7 @@ void SELECTION::SelectBetweenMarkers()
|
|||
for (lower_marker = center+1; lower_marker < movie_size; ++lower_marker)
|
||||
if (markers_manager.GetMarker(lower_marker)) break;
|
||||
|
||||
// clear selection without clearing focused, because otherwise there's strange bug when quickly pressing Ctrl+A right after clicking on already selected row
|
||||
ListView_SetItemState(piano_roll.hwndList, -1, 0, LVIS_SELECTED);
|
||||
ClearSelection();
|
||||
|
||||
// special case
|
||||
if (upper_marker == -1 && lower_marker == movie_size)
|
||||
|
|
|
@ -321,6 +321,7 @@ void TASEDITOR_LUA::submitinputchange(int frame, int joypad, int input)
|
|||
}
|
||||
}
|
||||
|
||||
// taseditor.submitinsertframes(int frame, int number)
|
||||
void TASEDITOR_LUA::submitinsertframes(int frame, int number)
|
||||
{
|
||||
if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR))
|
||||
|
@ -337,6 +338,7 @@ void TASEDITOR_LUA::submitinsertframes(int frame, int number)
|
|||
}
|
||||
}
|
||||
|
||||
// taseditor.submitdeleteframes(int frame, int number)
|
||||
void TASEDITOR_LUA::submitdeleteframes(int frame, int number)
|
||||
{
|
||||
if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR))
|
||||
|
@ -458,24 +460,5 @@ void TASEDITOR_LUA::clearinputchanges()
|
|||
pending_changes.resize(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -53,9 +53,6 @@
|
|||
#ifdef WIN32
|
||||
#include "drivers/win/pref.h"
|
||||
|
||||
#include "drivers/win/taseditor/greenzone.h"
|
||||
extern GREENZONE greenzone;
|
||||
|
||||
extern bool TaseditorIsRecording();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -679,7 +679,7 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_FRAME_ADVANCE, EMUCMDTYPE_MISC, FCEUI_FrameAdvance, FCEUI_FrameAdvanceEnd, 0, "Frame Advance", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SCREENSHOT, EMUCMDTYPE_MISC, FCEUI_SaveSnapshot, 0, 0, "Screenshot", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_HIDE_MENU_TOGGLE, EMUCMDTYPE_MISC, FCEUD_HideMenuToggle, 0, 0, "Hide Menu Toggle", 0 },
|
||||
{ EMUCMD_EXIT, EMUCMDTYPE_MISC, FCEUI_DoExit, 0, 0, "Exit", 0},
|
||||
{ EMUCMD_EXIT, EMUCMDTYPE_MISC, FCEUI_DoExit, 0, 0, "Exit", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SPEED_SLOWEST, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Slowest Speed", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SPEED_SLOWER, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Speed Down", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SPEED_NORMAL, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Normal Speed", EMUCMDFLAG_TASEDITOR },
|
||||
|
@ -736,16 +736,16 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_MOVIE_ICON_DISPLAY_TOGGLE, EMUCMDTYPE_MISC, FCEUD_ToggleStatusIcon, 0, 0, "Toggle Status Icon", EMUCMDFLAG_TASEDITOR },
|
||||
|
||||
#ifdef _S9XLUA_H
|
||||
{ EMUCMD_SCRIPT_RELOAD, EMUCMDTYPE_MISC, FCEU_ReloadLuaCode, 0, 0, "Reload current Lua script", 0 },
|
||||
{ EMUCMD_SCRIPT_RELOAD, EMUCMDTYPE_MISC, FCEU_ReloadLuaCode, 0, 0, "Reload current Lua script", EMUCMDFLAG_TASEDITOR },
|
||||
#endif
|
||||
|
||||
{ EMUCMD_SOUND_TOGGLE, EMUCMDTYPE_SOUND, FCEUD_SoundToggle, 0, 0, "Sound Mute Toggle", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SOUND_VOLUME_UP, EMUCMDTYPE_SOUND, CommandSoundAdjust, 0, 0, "Sound Volume Up", 0 },
|
||||
{ EMUCMD_SOUND_VOLUME_DOWN, EMUCMDTYPE_SOUND, CommandSoundAdjust, 0, 0, "Sound Volume Down", 0 },
|
||||
{ EMUCMD_SOUND_VOLUME_NORMAL, EMUCMDTYPE_SOUND, CommandSoundAdjust, 0, 0, "Sound Volume Normal", 0 },
|
||||
{ EMUCMD_SOUND_VOLUME_UP, EMUCMDTYPE_SOUND, CommandSoundAdjust, 0, 0, "Sound Volume Up", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SOUND_VOLUME_DOWN, EMUCMDTYPE_SOUND, CommandSoundAdjust, 0, 0, "Sound Volume Down", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_SOUND_VOLUME_NORMAL, EMUCMDTYPE_SOUND, CommandSoundAdjust, 0, 0, "Sound Volume Normal", EMUCMDFLAG_TASEDITOR },
|
||||
|
||||
{ EMUCMD_AVI_RECORD_AS, EMUCMDTYPE_AVI, FCEUD_AviRecordTo, 0, 0, "Record AVI As...", 0 },
|
||||
{ EMUCMD_AVI_STOP, EMUCMDTYPE_AVI, FCEUD_AviStop, 0, 0, "Stop AVI", 0 },
|
||||
{ EMUCMD_AVI_RECORD_AS, EMUCMDTYPE_AVI, FCEUD_AviRecordTo, 0, 0, "Record AVI As...", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_AVI_STOP, EMUCMDTYPE_AVI, FCEUD_AviStop, 0, 0, "Stop AVI", EMUCMDFLAG_TASEDITOR },
|
||||
|
||||
{ EMUCMD_FDS_EJECT_INSERT, EMUCMDTYPE_FDS, FCEUI_FDSInsert, 0, 0, "Eject or Insert FDS Disk", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_FDS_SIDE_SELECT, EMUCMDTYPE_FDS, FCEUI_FDSSelect, 0, 0, "Switch FDS Disk Side", EMUCMDFLAG_TASEDITOR },
|
||||
|
@ -766,27 +766,27 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_MISC_USE_INPUT_PRESET_1, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 1", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_USE_INPUT_PRESET_2, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 2", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_USE_INPUT_PRESET_3, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 3", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_DISPLAY_BG_TOGGLE, EMUCMDTYPE_MISC, BackgroundDisplayToggle, 0, 0, "Toggle Background Display", 0 },
|
||||
{ EMUCMD_MISC_DISPLAY_OBJ_TOGGLE, EMUCMDTYPE_MISC, ObjectDisplayToggle, 0, 0, "Toggle Object Display", 0 },
|
||||
{ EMUCMD_MISC_DISPLAY_BG_TOGGLE, EMUCMDTYPE_MISC, BackgroundDisplayToggle, 0, 0, "Toggle Background Display", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_DISPLAY_OBJ_TOGGLE, EMUCMDTYPE_MISC, ObjectDisplayToggle, 0, 0, "Toggle Object Display", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_DISPLAY_LAGCOUNTER_TOGGLE,EMUCMDTYPE_MISC, LagCounterToggle, 0, 0, "Lag Counter Toggle", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_OPENTASEDITOR, EMUCMDTYPE_TOOL, LaunchTasEditor, 0, 0, "Open TAS Editor", 0},
|
||||
{ EMUCMD_TOOL_OPENMEMORYWATCH, EMUCMDTYPE_TOOL, LaunchMemoryWatch,0, 0, "Open Memory Watch", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENCHEATS, EMUCMDTYPE_TOOL, LaunchCheats, 0, 0, "Open Cheats", 0},
|
||||
{ EMUCMD_TOOL_OPENDEBUGGER, EMUCMDTYPE_TOOL, LaunchDebugger, 0, 0, "Open Debugger", 0},
|
||||
{ EMUCMD_TOOL_OPENHEX, EMUCMDTYPE_TOOL, LaunchHex, 0, 0, "Open Hex Editor", 0},
|
||||
{ EMUCMD_TOOL_OPENPPU, EMUCMDTYPE_TOOL, LaunchPPU, 0, 0, "Open PPU Viewer", 0},
|
||||
{ EMUCMD_TOOL_OPENNTVIEW, EMUCMDTYPE_TOOL, LaunchNTView, 0, 0, "Open Name Table Viewer", 0},
|
||||
{ EMUCMD_TOOL_OPENTRACELOGGER, EMUCMDTYPE_TOOL, LaunchTraceLogger, 0, 0, "Open Trace Logger", 0},
|
||||
{ EMUCMD_TOOL_OPENCDLOGGER, EMUCMDTYPE_TOOL, LaunchCodeDataLogger, 0, 0, "Open Code/Data Logger", 0},
|
||||
{ EMUCMD_FRAMEADV_SKIPLAG, EMUCMDTYPE_MISC, FA_SkipLag, 0, 0, "Frame Adv.-Skip Lag", 0},
|
||||
{ EMUCMD_TOOL_OPENCHEATS, EMUCMDTYPE_TOOL, LaunchCheats, 0, 0, "Open Cheats", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENDEBUGGER, EMUCMDTYPE_TOOL, LaunchDebugger, 0, 0, "Open Debugger", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENHEX, EMUCMDTYPE_TOOL, LaunchHex, 0, 0, "Open Hex Editor", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENPPU, EMUCMDTYPE_TOOL, LaunchPPU, 0, 0, "Open PPU Viewer", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENNTVIEW, EMUCMDTYPE_TOOL, LaunchNTView, 0, 0, "Open Name Table Viewer", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENTRACELOGGER, EMUCMDTYPE_TOOL, LaunchTraceLogger, 0, 0, "Open Trace Logger", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENCDLOGGER, EMUCMDTYPE_TOOL, LaunchCodeDataLogger, 0, 0, "Open Code/Data Logger", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_FRAMEADV_SKIPLAG, EMUCMDTYPE_MISC, FA_SkipLag, 0, 0, "Frame Adv.-Skip Lag", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_OPENROM, EMUCMDTYPE_TOOL, OpenRom, 0, 0, "Open ROM", 0},
|
||||
{ EMUCMD_CLOSEROM, EMUCMDTYPE_TOOL, CloseRom, 0, 0, "Close ROM", 0},
|
||||
{ EMUCMD_RELOAD, EMUCMDTYPE_TOOL, ReloadRom, 0, 0, "Reload ROM or TAS Editor Project", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_DISPLAY_MOVIESUBTITLES, EMUCMDTYPE_MISC, MovieSubtitleToggle,0,0,"Toggle Movie Subtitles", 0},
|
||||
{ EMUCMD_MISC_DISPLAY_MOVIESUBTITLES, EMUCMDTYPE_MISC, MovieSubtitleToggle,0,0,"Toggle Movie Subtitles", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_MISC_UNDOREDOSAVESTATE, EMUCMDTYPE_MISC, UndoRedoSavestate, 0,0,"Undo/Redo Savestate", 0},
|
||||
{ EMUCMD_MISC_TOGGLEFULLSCREEN, EMUCMDTYPE_MISC, ToggleFullscreen, 0, 0, "Toggle Fullscreen", 0},
|
||||
{ EMUCMD_TOOL_OPENRAMWATCH, EMUCMDTYPE_TOOL, LaunchRamWatch, 0, 0, "Open Ram Watch", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_OPENRAMSEARCH, EMUCMDTYPE_TOOL, LaunchRamSearch, 0, 0, "Open Ram Search", 0},
|
||||
{ EMUCMD_TOOL_OPENRAMSEARCH, EMUCMDTYPE_TOOL, LaunchRamSearch, 0, 0, "Open Ram Search", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TOOL_RAMSEARCHLT, EMUCMDTYPE_TOOL, RamSearchOpLT, 0, 0, "Ram Search - Less Than", 0},
|
||||
{ EMUCMD_TOOL_RAMSEARCHGT, EMUCMDTYPE_TOOL, RamSearchOpGT, 0, 0, "Ram Search - Greater Than", 0},
|
||||
{ EMUCMD_TOOL_RAMSEARCHLTE, EMUCMDTYPE_TOOL, RamSearchOpLTE, 0, 0, "Ram Search - Less Than or Equal", 0},
|
||||
|
@ -811,7 +811,7 @@ void FCEUI_HandleEmuCommands(TestCommandState* testfn)
|
|||
int old_state = FCEUI_CommandTable[i].state;
|
||||
execcmd = FCEUI_CommandTable[i].cmd;
|
||||
new_state = (*testfn)(execcmd);
|
||||
// in TAS Editor mode forbid commands without the taseditor flag
|
||||
// in TAS Editor mode forbid commands without EMUCMDFLAG_TASEDITOR flag
|
||||
bool allow = true;
|
||||
if(taseditor && !(FCEUI_CommandTable[i].flags & EMUCMDFLAG_TASEDITOR))
|
||||
allow = false;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef __MOVIE_H_
|
||||
#define __MOVIE_H_
|
||||
|
||||
#define PROGRESSBAR_UPDATE_RATE 2000 // in frames of greenzone
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
|
Loading…
Reference in New Issue