* RAM Watch: fixed loading Data Size and Data Type from a .wch, now corrupted .wch won't crash FCEUX
* Taseditor: fixed tooltips
This commit is contained in:
parent
37a9f95de2
commit
7b886594f7
|
@ -598,6 +598,9 @@ bool Load_Watches(bool clear, const char* filename)
|
|||
strcpy(currentWatch,filename);
|
||||
RWAddRecentFile(currentWatch);
|
||||
AddressWatcher Temp;
|
||||
Temp.Address = 0; // default values
|
||||
Temp.Size = 'b';
|
||||
Temp.Type = 'h';
|
||||
char mode;
|
||||
fgets(Str_Tmp,1024,WatchFile);
|
||||
sscanf(Str_Tmp,"%c%*s",&mode);
|
||||
|
@ -607,16 +610,31 @@ bool Load_Watches(bool clear, const char* filename)
|
|||
WatchAdd+=WatchCount;
|
||||
for (int i = WatchCount; i < WatchAdd; i++)
|
||||
{
|
||||
while (i < 0)
|
||||
i++;
|
||||
do {
|
||||
fgets(Str_Tmp,1024,WatchFile);
|
||||
if (i < 0) i = 0;
|
||||
memset(Str_Tmp, 0, 1024);
|
||||
do
|
||||
{
|
||||
fgets(Str_Tmp, 1024, WatchFile);
|
||||
} while (Str_Tmp[0] == '\n');
|
||||
sscanf(Str_Tmp,"%*05X%*c%04X%*c%c%*c%c%*c%d",&(Temp.Address),&(Temp.Size),&(Temp.Type),&(Temp.WrongEndian));
|
||||
Temp.WrongEndian = 0;
|
||||
char *Comment = strrchr(Str_Tmp,DELIM) + 1;
|
||||
*strrchr(Comment,'\n') = '\0';
|
||||
InsertWatch(Temp,Comment);
|
||||
sscanf(Str_Tmp, "%*05X%*c%04X%*c%c%*c%c%*c%*c", &(Temp.Address), &(Temp.Size), &(Temp.Type));
|
||||
Temp.WrongEndian = false;
|
||||
char *Comment = strrchr(Str_Tmp, DELIM);
|
||||
if (Comment)
|
||||
{
|
||||
Comment++;
|
||||
char *CommentEnd = strrchr(Comment, '\n');
|
||||
if (CommentEnd)
|
||||
{
|
||||
*CommentEnd = '\0';
|
||||
InsertWatch(Temp, Comment);
|
||||
} else
|
||||
{
|
||||
// the wch file is probably corrupted
|
||||
InsertWatch(Temp, Comment);
|
||||
break;
|
||||
}
|
||||
} else
|
||||
break; // the wch file is probably corrupted
|
||||
}
|
||||
|
||||
fclose(WatchFile);
|
||||
|
|
|
@ -1427,8 +1427,8 @@ BEGIN
|
|||
RTEXT "Marker 99999",IDC_SELECTION_MARKER,4,335,60,10,SS_NOTIFY,WS_EX_RIGHT
|
||||
CONTROL "",IDC_BRANCHES_BITMAP,"Static",SS_OWNERDRAW | SS_NOTIFY | SS_REALSIZEIMAGE | NOT WS_VISIBLE,202,178,113,89
|
||||
CONTROL " Turbo seek",CHECK_TURBO_SEEK,"Button",BS_AUTOCHECKBOX,263,25,50,12
|
||||
LTEXT "Selection: 0 rows, 16 columns",IDC_TEXT_SELECTION,204,118,112,10
|
||||
LTEXT "Clipboard: 0 rows, 16 columns",IDC_TEXT_CLIPBOARD,203,128,114,10
|
||||
LTEXT "Selection: 0 rows, 16 columns",IDC_TEXT_SELECTION,204,118,112,10,SS_NOTIFY
|
||||
LTEXT "Clipboard: 0 rows, 16 columns",IDC_TEXT_CLIPBOARD,203,128,114,10,SS_NOTIFY
|
||||
CONTROL " Recording",IDC_RECORDING,"Button",BS_AUTO3STATE,203,71,64,10
|
||||
PUSHBUTTON "Run function",TASEDITOR_RUN_MANUAL,202,150,54,14,WS_DISABLED | NOT WS_TABSTOP
|
||||
CONTROL "Auto function",IDC_RUN_AUTO,"Button",BS_AUTOCHECKBOX,261,152,55,10
|
||||
|
|
|
@ -163,13 +163,13 @@ Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = {
|
|||
TASEDITOR_FIND_NEXT_SIMILAR_MARKER, -1, -1, 0, -1, "Continue Auto-search", "", false, 0, 0,
|
||||
TASEDITOR_NEXT_MARKER, -1, -1, 0, -1, "Send Selection to next Marker (mouse: Ctrl+Wheel up) (hotkey: Ctrl+PageDown)", "", false, 0, 0,
|
||||
IDC_PLAYBACK_MARKER_EDIT, 0, 0, -1, 0, "Click to edit text", "", false, 0, 0,
|
||||
IDC_PLAYBACK_MARKER, 0, 0, 0, 0, "Click here to scroll Piano Roll to Playback cursor (hotkey: tap Shift twice)", "", true, 0, 0,
|
||||
IDC_PLAYBACK_MARKER, 0, 0, 0, 0, "Click here to scroll Piano Roll to Playback cursor (hotkey: tap Shift twice)", "", false, 0, 0,
|
||||
IDC_SELECTION_MARKER_EDIT, 0, -1, -1, -1, "Click to edit text", "", false, 0, 0,
|
||||
IDC_SELECTION_MARKER, 0, -1, 0, -1, "Click here to scroll Piano Roll to Selection (hotkey: tap Ctrl twice)", "", true, 0, 0,
|
||||
IDC_BRANCHES_BITMAP, -1, 0, 0, 0, "Click on a Bookmark to send Playback cursor there, double-click to load its Branch", "", false, 0, 0,
|
||||
IDC_SELECTION_MARKER, 0, -1, 0, -1, "Click here to scroll Piano Roll to Selection (hotkey: tap Ctrl twice)", "", false, 0, 0,
|
||||
IDC_BRANCHES_BITMAP, -1, 0, 0, 0, "Right click = set Bookmark, single Left click = jump to Bookmark, double Left click = load Branch", "", false, 0, 0,
|
||||
CHECK_TURBO_SEEK, -1, 0, 0, 0, "Uncheck when you need to watch seeking in slow motion", "", false, 0, 0,
|
||||
IDC_TEXT_SELECTION, -1, 0, 0, 0, "Current size of Selection", "", true, 0, 0,
|
||||
IDC_TEXT_CLIPBOARD, -1, 0, 0, 0, "Current size of Input in the Clipboard", "", true, 0, 0,
|
||||
IDC_TEXT_SELECTION, -1, 0, 0, 0, "Current size of Selection", "", false, 0, 0,
|
||||
IDC_TEXT_CLIPBOARD, -1, 0, 0, 0, "Current size of Input in the Clipboard", "", false, 0, 0,
|
||||
IDC_RECORDING, -1, 0, 0, 0, "Switch Input Recording on/off", "", false, EMUCMD_MOVIE_READONLY_TOGGLE, 0,
|
||||
TASEDITOR_RUN_MANUAL, -1, 0, 0, 0, "Press the button to execute Lua Manual Function", "", false, 0, 0,
|
||||
IDC_RUN_AUTO, -1, 0, 0, 0, "Enable Lua Auto Function (but first it must be registered by Lua script)", "", false, 0, 0,
|
||||
|
@ -209,7 +209,6 @@ void TASEDITOR_WINDOW::init()
|
|||
{
|
||||
if (window_items[i].tooltip_text_base[0])
|
||||
{
|
||||
// Create the tooltip. g_hInst is the global instance handle
|
||||
window_items[i].tooltip_hwnd = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL,
|
||||
WS_POPUP | TTS_ALWAYSTIP | TTS_BALLOON,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
|
@ -255,15 +254,15 @@ void TASEDITOR_WINDOW::init()
|
|||
{
|
||||
toolInfo.lpszText = window_items[i].tooltip_text_base;
|
||||
}
|
||||
SendMessage(window_items[i].tooltip_hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);
|
||||
SendMessage(window_items[i].tooltip_hwnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, TOOLTIPS_AUTOPOP_TIMEOUT);
|
||||
x = SendMessage(window_items[i].tooltip_hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);
|
||||
x = SendMessage(window_items[i].tooltip_hwnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, TOOLTIPS_AUTOPOP_TIMEOUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
UpdateTooltips();
|
||||
// subclass "Marker X" text fields
|
||||
IDC_PLAYBACK_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_PLAYBACK_MARKER), GWL_WNDPROC, (LONG)IDC_PLAYBACK_MARKER_WndProc);
|
||||
IDC_SELECTION_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_SELECTION_MARKER), GWL_WNDPROC, (LONG)IDC_SELECTION_MARKER_WndProc);
|
||||
//IDC_PLAYBACK_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_PLAYBACK_MARKER), GWL_WNDPROC, (LONG)IDC_PLAYBACK_MARKER_WndProc);
|
||||
//IDC_SELECTION_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_SELECTION_MARKER), GWL_WNDPROC, (LONG)IDC_SELECTION_MARKER_WndProc);
|
||||
// subclass all buttons
|
||||
IDC_PROGRESS_BUTTON_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_PROGRESS_BUTTON), GWL_WNDPROC, (LONG)IDC_PROGRESS_BUTTON_WndProc);
|
||||
IDC_BRANCHES_BUTTON_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTasEditor, IDC_BRANCHES_BUTTON), GWL_WNDPROC, (LONG)IDC_BRANCHES_BUTTON_WndProc);
|
||||
|
|
Loading…
Reference in New Issue