Win32 - RamWatch - Recent Watch menu now hooked up

This commit is contained in:
adelikat 2009-05-07 16:17:22 +00:00
parent 90b14dccfd
commit 68c8951648
2 changed files with 14 additions and 3 deletions

View File

@ -1630,6 +1630,13 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
ramw_x = GetPrivateProfileInt("RamWatch", "RWWindowPosX", 0, IniName);
ramw_y = GetPrivateProfileInt("RamWatch", "RWWindowPosY", 0, IniName);
for(int i = 0; i < MAX_RECENT_WATCHES; i++)
{
char str[256];
sprintf(str, "Recent Watch %d", i+1);
GetPrivateProfileString("Watches", str, "", &rw_recent_files[i][0], 1024, IniName);
}
//sprintf(text, "%s", DESMUME_NAME_AND_VERSION);
MainWindow = new WINCLASS(CLASSNAME, hThisInstance);
DWORD dwStyle = WS_CAPTION| WS_SYSMENU | WS_SIZEBOX | WS_MINIMIZEBOX | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
@ -2590,9 +2597,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
WritePrivateProfileInt("RamWatch", "RWWindowPosX", ramw_x, IniName);
WritePrivateProfileInt("RamWatch", "RWWindowPosY", ramw_y, IniName);
for(int i = 0; i < MAX_RECENT_WATCHES; i++)
{
char str[256];
sprintf(str, "Recent Watch %d", i+1);
WritePrivateProfileString("Watches", str, &rw_recent_files[i][0], IniName);
}
//TODO: save Auto-load bool value
//TODO: save ram watch recent files
ExitRunLoop();
}
else

View File

@ -359,7 +359,7 @@ void UpdateRWRecentArray(const char* addString, unsigned int arrayLen, HMENU men
void RWAddRecentFile(const char *filename)
{
// UpdateRWRecentArray(filename, MAX_RECENT_WATCHES, rwrecentmenu, RAMMENU_FILE_RECENT, RW_MENU_FIRST_RECENT_FILE);
UpdateRWRecentArray(filename, MAX_RECENT_WATCHES, rwrecentmenu, RAMMENU_FILE_RECENT, RW_MENU_FIRST_RECENT_FILE);
}
void OpenRWRecentFile(int memwRFileNumber)