Add a menu option to clear the cache.
This commit is contained in:
parent
f566e42205
commit
9fc55e631e
Binary file not shown.
|
@ -127,10 +127,15 @@ BEGIN
|
|||
END
|
||||
POPUP "&Settings"
|
||||
BEGIN
|
||||
MENUITEM "Config &Controller...", ID_SETTINGS_CONFIG_CONTROLLER
|
||||
MENUITEM "Config &Controller...", ID_SETTINGS_CONFIGURESOUND
|
||||
MENUITEM "Config &Audio...", ID_SETTINGS_CONFIGURESOUND, GRAYED
|
||||
MENUITEM "Config &Video...", ID_SETTINGS_CONFIG_VIDEO
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&HLE Cache"
|
||||
BEGIN
|
||||
MENUITEM "&Clear HLE Cache", ID_CACHE_CLEARHLECACHE
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&LLE (Experimental)"
|
||||
BEGIN
|
||||
MENUITEM "LLE &JIT", ID_EMULATION_LLE_JIT
|
||||
|
@ -314,9 +319,9 @@ END
|
|||
// TXT
|
||||
//
|
||||
|
||||
IDR_CONTRIBUTORS TXT "..\\CONTRIBUTORS"
|
||||
IDR_CONTRIBUTORS TXT "C:\\Users\\lukeu\\Desktop\\Projects\\Xbox\\cxbx-reloaded\\CONTRIBUTORS"
|
||||
|
||||
IDR_COPYING TXT "..\\COPYING"
|
||||
IDR_COPYING TXT "C:\\Users\\lukeu\\Desktop\\Projects\\Xbox\\cxbx-reloaded\\COPYING"
|
||||
|
||||
#endif // English (United Kingdom) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -90,6 +90,8 @@
|
|||
#define ID_EDIT_DUMPXBEINFOTO_FILE 40071
|
||||
#define ID_EDIT_DUMPXBEINFOTO_DEBUGCONSOLE 40072
|
||||
#define ID_EMULATION_STOP 40082
|
||||
#define ID_SETTINGS_CACHE 40083
|
||||
#define ID_CACHE_CLEARHLECACHE 40084
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
|
@ -97,7 +99,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||
#define _APS_NEXT_COMMAND_VALUE 40083
|
||||
#define _APS_NEXT_COMMAND_VALUE 40085
|
||||
#define _APS_NEXT_CONTROL_VALUE 1058
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
|
|
|
@ -867,6 +867,28 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
|||
ShowVideoConfig(hwnd);
|
||||
break;
|
||||
|
||||
case ID_CACHE_CLEARHLECACHE:
|
||||
{
|
||||
std::string cacheDir = std::string(XTL::szFolder_CxbxReloadedData) + "\\HLECache\\";
|
||||
std::string fullpath = cacheDir + "*.*";
|
||||
|
||||
WIN32_FIND_DATA data;
|
||||
HANDLE hFind = FindFirstFile(fullpath.c_str(), &data);
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
BOOL bContinue = TRUE;
do {
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
fullpath = cacheDir + data.cFileName;
|
||||
if (!DeleteFile(fullpath.c_str())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bContinue = FindNextFile(hFind, &data);
|
||||
} while (bContinue);
|
||||
FindClose(hFind);
|
||||
}
|
||||
MessageBox(m_hwnd, "The HLE Cache has been cleared.", "Cxbx-Reloaded", MB_OK);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_EMULATION_DEBUGOUTPUTKERNEL_CONSOLE:
|
||||
{
|
||||
if(m_KrnlDebug == DM_NONE || m_KrnlDebug == DM_FILE)
|
||||
|
|
Loading…
Reference in New Issue