[Project64] Code cleanup of Main Menu Class.cpp
This commit is contained in:
parent
3b74fef76c
commit
24709944f3
|
@ -868,7 +868,6 @@ void CN64System::ExecuteCPU()
|
||||||
g_Notify->DisplayMessage(5, MSG_EMULATION_STARTED);
|
g_Notify->DisplayMessage(5, MSG_EMULATION_STARTED);
|
||||||
|
|
||||||
m_EndEmulation = false;
|
m_EndEmulation = false;
|
||||||
Notify().RefreshMenu();
|
|
||||||
|
|
||||||
m_Plugins->RomOpened();
|
m_Plugins->RomOpened();
|
||||||
if (m_SyncCPU)
|
if (m_SyncCPU)
|
||||||
|
@ -1105,7 +1104,7 @@ void CN64System::SyncCPU(CN64System * const SecondCPU)
|
||||||
// if (PROGRAM_COUNTER == 0x8009BBD8) {
|
// if (PROGRAM_COUNTER == 0x8009BBD8) {
|
||||||
// g_Notify->BreakPoint(__FILEW__,__LINE__);
|
// g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void CN64System::SyncSystem()
|
void CN64System::SyncSystem()
|
||||||
{
|
{
|
||||||
|
@ -2036,7 +2035,7 @@ bool CN64System::WriteToProtectedMemory(uint32_t Address, int length)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CN64System::TLB_Mapped(uint32_t VAddr, uint32_t Len, uint32_t PAddr, bool bReadOnly)
|
void CN64System::TLB_Mapped(uint32_t VAddr, uint32_t Len, uint32_t PAddr, bool bReadOnly)
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,84 +2,84 @@
|
||||||
|
|
||||||
enum MainMenuID
|
enum MainMenuID
|
||||||
{
|
{
|
||||||
//File Menu
|
//File Menu
|
||||||
ID_FILE_OPEN_ROM = 4000, ID_FILE_ROM_INFO, ID_FILE_STARTEMULATION, ID_FILE_ENDEMULATION,
|
ID_FILE_OPEN_ROM = 4000, ID_FILE_ROM_INFO, ID_FILE_STARTEMULATION, ID_FILE_ENDEMULATION,
|
||||||
ID_FILE_ROMDIRECTORY, ID_FILE_REFRESHROMLIST, ID_FILE_EXIT,
|
ID_FILE_ROMDIRECTORY, ID_FILE_REFRESHROMLIST, ID_FILE_EXIT,
|
||||||
|
|
||||||
//language
|
//language
|
||||||
ID_LANG_START, ID_LANG_END = ID_LANG_START + 100,
|
ID_LANG_START, ID_LANG_END = ID_LANG_START + 100,
|
||||||
|
|
||||||
//Recent Files
|
//Recent Files
|
||||||
ID_RECENT_ROM_START, ID_RECENT_ROM_END = ID_RECENT_ROM_START + 20,
|
ID_RECENT_ROM_START, ID_RECENT_ROM_END = ID_RECENT_ROM_START + 20,
|
||||||
|
|
||||||
//Recent Dir
|
//Recent Dir
|
||||||
ID_RECENT_DIR_START, ID_RECENT_DIR_END = ID_RECENT_DIR_START + 20,
|
ID_RECENT_DIR_START, ID_RECENT_DIR_END = ID_RECENT_DIR_START + 20,
|
||||||
|
|
||||||
//System Menu
|
//System Menu
|
||||||
ID_SYSTEM_RESET_SOFT, ID_SYSTEM_RESET_HARD, ID_SYSTEM_PAUSE, ID_SYSTEM_BITMAP,
|
ID_SYSTEM_RESET_SOFT, ID_SYSTEM_RESET_HARD, ID_SYSTEM_PAUSE, ID_SYSTEM_BITMAP,
|
||||||
ID_SYSTEM_LIMITFPS, ID_SYSTEM_RESTORE, ID_SYSTEM_LOAD, ID_SYSTEM_SAVE,
|
ID_SYSTEM_LIMITFPS, ID_SYSTEM_RESTORE, ID_SYSTEM_LOAD, ID_SYSTEM_SAVE,
|
||||||
ID_SYSTEM_SAVEAS, ID_SYSTEM_CHEAT, ID_SYSTEM_GSBUTTON,
|
ID_SYSTEM_SAVEAS, ID_SYSTEM_CHEAT, ID_SYSTEM_GSBUTTON,
|
||||||
|
|
||||||
//Current Save Slot
|
//Current Save Slot
|
||||||
ID_CURRENT_SAVE_1,ID_CURRENT_SAVE_2,ID_CURRENT_SAVE_3,ID_CURRENT_SAVE_4,ID_CURRENT_SAVE_5,
|
ID_CURRENT_SAVE_1, ID_CURRENT_SAVE_2, ID_CURRENT_SAVE_3, ID_CURRENT_SAVE_4, ID_CURRENT_SAVE_5,
|
||||||
ID_CURRENT_SAVE_6,ID_CURRENT_SAVE_7,ID_CURRENT_SAVE_8,ID_CURRENT_SAVE_9,ID_CURRENT_SAVE_10,
|
ID_CURRENT_SAVE_6, ID_CURRENT_SAVE_7, ID_CURRENT_SAVE_8, ID_CURRENT_SAVE_9, ID_CURRENT_SAVE_10,
|
||||||
ID_CURRENT_SAVE_DEFAULT,
|
ID_CURRENT_SAVE_DEFAULT,
|
||||||
|
|
||||||
//Option Menu
|
//Option Menu
|
||||||
ID_OPTIONS_FULLSCREEN, ID_OPTIONS_FULLSCREEN2, ID_OPTIONS_ALWAYSONTOP, ID_OPTIONS_CONFIG_GFX,
|
ID_OPTIONS_FULLSCREEN, ID_OPTIONS_FULLSCREEN2, ID_OPTIONS_ALWAYSONTOP, ID_OPTIONS_CONFIG_GFX,
|
||||||
ID_OPTIONS_CONFIG_AUDIO, ID_OPTIONS_CONFIG_CONT,ID_OPTIONS_CONFIG_RSP, ID_OPTIONS_CPU_USAGE,
|
ID_OPTIONS_CONFIG_AUDIO, ID_OPTIONS_CONFIG_CONT, ID_OPTIONS_CONFIG_RSP, ID_OPTIONS_CPU_USAGE,
|
||||||
ID_OPTIONS_SETTINGS, ID_OPTIONS_DISPLAY_FR, ID_OPTIONS_CHANGE_FR, ID_OPTIONS_INCREASE_SPEED,
|
ID_OPTIONS_SETTINGS, ID_OPTIONS_DISPLAY_FR, ID_OPTIONS_CHANGE_FR, ID_OPTIONS_INCREASE_SPEED,
|
||||||
ID_OPTIONS_DECREASE_SPEED,
|
ID_OPTIONS_DECREASE_SPEED,
|
||||||
|
|
||||||
//Debugger Menu
|
//Debugger Menu
|
||||||
ID_DEBUG_SHOW_TLB_MISSES, ID_DEBUG_SHOW_UNHANDLED_MEM, ID_DEBUG_SHOW_PIF_ERRORS,
|
ID_DEBUG_SHOW_TLB_MISSES, ID_DEBUG_SHOW_UNHANDLED_MEM, ID_DEBUG_SHOW_PIF_ERRORS,
|
||||||
ID_DEBUG_SHOW_DLIST_COUNT, ID_DEBUG_SHOW_RECOMP_MEM_SIZE,ID_DEBUG_SHOW_DIV_BY_ZERO,
|
ID_DEBUG_SHOW_DLIST_COUNT, ID_DEBUG_SHOW_RECOMP_MEM_SIZE, ID_DEBUG_SHOW_DIV_BY_ZERO,
|
||||||
ID_DEBUG_GENERATE_LOG_FILES, ID_DEBUG_DISABLE_GAMEFIX,
|
ID_DEBUG_GENERATE_LOG_FILES, ID_DEBUG_DISABLE_GAMEFIX,
|
||||||
ID_DEBUGGER_LOGOPTIONS, ID_DEBUGGER_GENERATELOG, ID_DEBUGGER_DUMPMEMORY, ID_DEBUGGER_SEARCHMEMORY,
|
ID_DEBUGGER_LOGOPTIONS, ID_DEBUGGER_GENERATELOG, ID_DEBUGGER_DUMPMEMORY, ID_DEBUGGER_SEARCHMEMORY,
|
||||||
ID_DEBUGGER_TLBENTRIES, ID_DEBUGGER_BREAKPOINTS, ID_DEBUGGER_MEMORY, ID_DEBUGGER_R4300REGISTERS,
|
ID_DEBUGGER_TLBENTRIES, ID_DEBUGGER_BREAKPOINTS, ID_DEBUGGER_MEMORY, ID_DEBUGGER_R4300REGISTERS,
|
||||||
ID_DEBUGGER_INTERRUPT_SP, ID_DEBUGGER_INTERRUPT_SI, ID_DEBUGGER_INTERRUPT_AI, ID_DEBUGGER_INTERRUPT_VI,
|
ID_DEBUGGER_INTERRUPT_SP, ID_DEBUGGER_INTERRUPT_SI, ID_DEBUGGER_INTERRUPT_AI, ID_DEBUGGER_INTERRUPT_VI,
|
||||||
ID_DEBUGGER_INTERRUPT_PI, ID_DEBUGGER_INTERRUPT_DP,
|
ID_DEBUGGER_INTERRUPT_PI, ID_DEBUGGER_INTERRUPT_DP,
|
||||||
|
|
||||||
// App logging
|
// App logging
|
||||||
ID_DEBUGGER_APPLOG_ERRORS, ID_DEBUGGER_APPLOG_SETTINGS, ID_DEBUGGER_APPLOG_GFX_PLUGIN,
|
ID_DEBUGGER_APPLOG_ERRORS, ID_DEBUGGER_APPLOG_SETTINGS, ID_DEBUGGER_APPLOG_GFX_PLUGIN,
|
||||||
ID_DEBUGGER_APPLOG_DEBUG, ID_DEBUGGER_APPLOG_FLUSH, ID_DEBUGGER_APPLOG_RECOMPILER,
|
ID_DEBUGGER_APPLOG_DEBUG, ID_DEBUGGER_APPLOG_FLUSH, ID_DEBUGGER_APPLOG_RECOMPILER,
|
||||||
ID_DEBUGGER_APPLOG_RSP, ID_DEBUGGER_APPLOG_TLB, ID_DEBUGGER_APPLOG_AUDIO_EMU,
|
ID_DEBUGGER_APPLOG_RSP, ID_DEBUGGER_APPLOG_TLB, ID_DEBUGGER_APPLOG_AUDIO_EMU,
|
||||||
|
|
||||||
//Profile Menu
|
//Profile Menu
|
||||||
ID_PROFILE_PROFILE, ID_PROFILE_RESETCOUNTER, ID_PROFILE_GENERATELOG,
|
ID_PROFILE_PROFILE, ID_PROFILE_RESETCOUNTER, ID_PROFILE_GENERATELOG,
|
||||||
|
|
||||||
//Help Menu
|
//Help Menu
|
||||||
ID_HELP_SUPPORTFORUM, ID_HELP_HOMEPAGE, ID_HELP_ABOUTSETTINGFILES, ID_HELP_ABOUT,
|
ID_HELP_SUPPORTFORUM, ID_HELP_HOMEPAGE, ID_HELP_ABOUTSETTINGFILES, ID_HELP_ABOUT,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CMainMenu :
|
class CMainMenu :
|
||||||
public CBaseMenu,
|
public CBaseMenu,
|
||||||
private CDebugSettings
|
private CDebugSettings
|
||||||
{
|
{
|
||||||
typedef std::list<SettingID> SettingList;
|
typedef std::list<SettingID> SettingList;
|
||||||
|
|
||||||
CMainGui * _Gui;
|
CMainGui * _Gui;
|
||||||
|
|
||||||
//MSC_MAP m_ShortCuts;
|
//MSC_MAP m_ShortCuts;
|
||||||
void * m_AccelTable;
|
void * m_AccelTable;
|
||||||
bool m_ResetAccelerators;
|
bool m_ResetAccelerators;
|
||||||
CShortCuts m_ShortCuts;
|
CShortCuts m_ShortCuts;
|
||||||
SettingList m_ChangeSettingList;
|
SettingList m_ChangeSettingList;
|
||||||
CriticalSection m_CS;
|
CriticalSection m_CS;
|
||||||
|
|
||||||
void FillOutMenu ( HMENU hMenu );
|
void FillOutMenu(HMENU hMenu);
|
||||||
//stdstr ShortCutString(MSC_MAP & ShortCuts, int MenuID, CMenuShortCutKey::ACCESS_MODE AccessLevel);
|
//stdstr ShortCutString(MSC_MAP & ShortCuts, int MenuID, CMenuShortCutKey::ACCESS_MODE AccessLevel);
|
||||||
std::wstring GetSaveSlotString ( int Slot );
|
std::wstring GetSaveSlotString(int Slot);
|
||||||
stdstr GetFileLastMod ( stdstr FileName );
|
stdstr GetFileLastMod(stdstr FileName);
|
||||||
void RebuildAccelerators ( void );
|
void RebuildAccelerators(void);
|
||||||
|
|
||||||
static void SettingsChanged (CMainMenu * _this );
|
static void SettingsChanged(CMainMenu * _this);
|
||||||
public:
|
public:
|
||||||
CMainMenu ( CMainGui * Window );
|
CMainMenu(CMainGui * Window);
|
||||||
~CMainMenu();
|
~CMainMenu();
|
||||||
|
|
||||||
int ProcessAccelerator ( HWND hWnd, void * lpMsg );
|
int ProcessAccelerator(HWND hWnd, void * lpMsg);
|
||||||
bool ProcessMessage ( HWND hWnd, DWORD wNotifyCode, DWORD wID);
|
bool ProcessMessage(HWND hWnd, DWORD wNotifyCode, DWORD wID);
|
||||||
void ResetMenu ( void );
|
void ResetMenu(void);
|
||||||
void ResetAccelerators ( void ) { m_ResetAccelerators = true; }
|
void ResetAccelerators(void) { m_ResetAccelerators = true; }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue