Merge pull request #2021 from vgturtle127/beauitification-6

Beautification 6 - branch is spelled wrong edition - the Source\Project64\UserInterface directory
This commit is contained in:
zilmar 2021-03-18 13:03:38 +10:30 committed by GitHub
commit e2301332a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 157 additions and 179 deletions

View File

@ -46,9 +46,9 @@ const _gprNames = [
't8', 't9', 'k0', 'k1', 'gp', 'sp', 'fp', 'ra' 't8', 't9', 'k0', 'k1', 'gp', 'sp', 'fp', 'ra'
] ]
// When we give callbacks or objects to native code, we need to make sure we keep a strong backing reference // When we give callbacks or objects to native code, we need to make sure we keep a strong backing reference
// to them in Javascript so they don't get garbage collected before native code uses them. // to them in JavaScript so they don't get garbage collected before native code uses them
const _strongBackingReferences = (function() { const _strongBackingReferences = (function() {
const _references = []; const _references = [];
const noop = function () { }; const noop = function () { };
@ -85,7 +85,6 @@ const _strongBackingReferences = (function() {
}; };
}) (); }) ();
const GPR_R0 = (1 << 0) const GPR_R0 = (1 << 0)
const GPR_AT = (1 << 1) const GPR_AT = (1 << 1)
const GPR_V0 = (1 << 2) const GPR_V0 = (1 << 2)
@ -889,7 +888,7 @@ function Socket(fd)
if(fd) if(fd)
{ {
// assume this was constructed from Server // Assume this was constructed from server
_fd = fd; _fd = fd;
connected = true; connected = true;
} else { } else {
@ -950,7 +949,7 @@ function Socket(fd)
_native.read(_fd, _bufferSize, _strongBackingReferences.singleUseCallback(_read)); _native.read(_fd, _bufferSize, _strongBackingReferences.singleUseCallback(_read));
break; break;
case 'close': case 'close':
// note: does nothing if ondata not set // Note: does nothing if ondata not set
_onclose = callback _onclose = callback
break; break;
} }

View File

@ -16,7 +16,7 @@ LRESULT CAboutDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPara
{ {
AboutMsg += stdstr_f("Thank you %s for the support!\n\n", m_Support.Name()); AboutMsg += stdstr_f("Thank you %s for the support!\n\n", m_Support.Name());
} }
AboutMsg += "Project64 is a completely free and open-source emulator for the Nintendo 64 and 64DD written in C++.\n\nCapable of playing your favorite N64 games on your PC with high definition graphics, excellent compatibility, save states, built - in cheat codes, and more."; AboutMsg += "Project64 is a completely free and open-source emulator for the Nintendo 64 and 64DD written in C++.\n\nCapable of playing your favorite N64 games on your PC with high-definition graphics, excellent compatibility, save states, built - in cheat codes, and more!";
CDC hDC = GetDC(); CDC hDC = GetDC();
float DPIScale = hDC.GetDeviceCaps(LOGPIXELSX) / 96.0f; float DPIScale = hDC.GetDeviceCaps(LOGPIXELSX) / 96.0f;
@ -30,7 +30,7 @@ LRESULT CAboutDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPara
SetWindowDetais(IDC_VERSION, IDC_BMP_LOGO, stdstr_f("Version: %s", VER_FILE_VERSION_STR).ToUTF16().c_str(), m_BoldFont); SetWindowDetais(IDC_VERSION, IDC_BMP_LOGO, stdstr_f("Version: %s", VER_FILE_VERSION_STR).ToUTF16().c_str(), m_BoldFont);
SetWindowDetais(IDC_ABOUT_PROJECT, IDC_VERSION, AboutMsg.ToUTF16().c_str(), m_TextFont); SetWindowDetais(IDC_ABOUT_PROJECT, IDC_VERSION, AboutMsg.ToUTF16().c_str(), m_TextFont);
SetWindowDetais(IDC_THANKS_CORE, IDC_ABOUT_PROJECT, L"Special Thanks to previous core members:", m_BoldFont); SetWindowDetais(IDC_THANKS_CORE, IDC_ABOUT_PROJECT, L"Special thanks to previous core members:", m_BoldFont);
SetWindowDetais(IDC_CORE_THANK_LIST, IDC_THANKS_CORE, L"Jabo, Smiff, Gent", m_TextFont); SetWindowDetais(IDC_CORE_THANK_LIST, IDC_THANKS_CORE, L"Jabo, Smiff, Gent", m_TextFont);
SetWindowDetais(IDC_THANKYOU, IDC_CORE_THANK_LIST, L"Thanks also goes to:", m_BoldFont); SetWindowDetais(IDC_THANKYOU, IDC_CORE_THANK_LIST, L"Thanks also goes to:", m_BoldFont);
SetWindowDetais(IDC_THANKYOU_LIST, IDC_THANKYOU, L"Jahra!n, Witten, RadeonUser, Azimer, Shygoo, Frank, LuigiBlood, theboy181, Gonetz, BlueToonYoshi, Kimbjo, Melchior, retroben, AIO, krom", m_TextFont); SetWindowDetais(IDC_THANKYOU_LIST, IDC_THANKYOU, L"Jahra!n, Witten, RadeonUser, Azimer, Shygoo, Frank, LuigiBlood, theboy181, Gonetz, BlueToonYoshi, Kimbjo, Melchior, retroben, AIO, krom", m_TextFont);

View File

@ -326,7 +326,7 @@ LRESULT CCheatList::OnTreeRClicked(NMHDR* lpnmh)
TVHITTESTINFO ht = { 0 }; TVHITTESTINFO ht = { 0 };
uint32_t dwpos = GetMessagePos(); uint32_t dwpos = GetMessagePos();
// include <windowsx.h> and <windows.h> header files // Include <windowsx.h> and <windows.h> header files
ht.pt.x = GET_X_LPARAM(dwpos); ht.pt.x = GET_X_LPARAM(dwpos);
ht.pt.y = GET_Y_LPARAM(dwpos); ht.pt.y = GET_Y_LPARAM(dwpos);
::MapWindowPoints(HWND_DESKTOP, lpnmh->hwndFrom, &ht.pt, 1); ::MapWindowPoints(HWND_DESKTOP, lpnmh->hwndFrom, &ht.pt, 1);
@ -334,7 +334,7 @@ LRESULT CCheatList::OnTreeRClicked(NMHDR* lpnmh)
TreeView_HitTest(lpnmh->hwndFrom, &ht); TreeView_HitTest(lpnmh->hwndFrom, &ht);
m_hSelectedItem = ht.hItem; m_hSelectedItem = ht.hItem;
//Show Menu // Show menu
HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_CHEAT_MENU)); HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_CHEAT_MENU));
HMENU hPopupMenu = GetSubMenu(hMenu, 0); HMENU hPopupMenu = GetSubMenu(hMenu, 0);
POINT Mouse; POINT Mouse;

View File

@ -5,7 +5,7 @@
#define UNIX_TIME_START 0x019DB1DED53E8000 #define UNIX_TIME_START 0x019DB1DED53E8000
#define TICKS_PER_SECOND 10000000 #define TICKS_PER_SECOND 10000000
//Discord Project64 App ID // Discord Project64 app ID
#define PJ64_DISCORD_APPID "704794684387491891" #define PJ64_DISCORD_APPID "704794684387491891"
void CDiscord::Init() void CDiscord::Init()
@ -39,13 +39,13 @@ static stdstr GetTitle()
void CDiscord::Update(bool bHaveGame) void CDiscord::Update(bool bHaveGame)
{ {
// Variables we use later // Variables we use later
//title uses the Rdb_GoodName to display a proper game name over DiscordRPC // Title uses the Rdb_GoodName to display a proper game name over DiscordRPC
//artwork uses the Header of the rom to easily add game pictures through the discord developer panel using the ID above // Artwork uses the header of the ROM to easily add game images through the Discord developer panel using the ID above
stdstr title = bHaveGame ? GetTitle() : ""; stdstr title = bHaveGame ? GetTitle() : "";
stdstr artwork = bHaveGame ? g_Settings->LoadStringVal(Rdb_RPCKey) : ""; stdstr artwork = bHaveGame ? g_Settings->LoadStringVal(Rdb_RPCKey) : "";
//Load Game Into DiscordRPC //Load game into DiscordRPC
DiscordRichPresence discordPresence = {}; //activates DiscordRPC DiscordRichPresence discordPresence = {}; // Activates DiscordRPC
if (artwork.empty()) if (artwork.empty())
{ {
discordPresence.largeImageKey = "pj64_icon"; discordPresence.largeImageKey = "pj64_icon";
@ -61,7 +61,7 @@ void CDiscord::Update(bool bHaveGame)
discordPresence.details = title.empty() ? "Not in-game" : title.c_str(); discordPresence.details = title.empty() ? "Not in-game" : title.c_str();
discordPresence.startTimestamp = Timestamp(); discordPresence.startTimestamp = Timestamp();
Discord_UpdatePresence(&discordPresence); //end DiscordRPC Discord_UpdatePresence(&discordPresence); // End DiscordRPC
} }
int64_t CDiscord::Timestamp() int64_t CDiscord::Timestamp()

View File

@ -559,7 +559,6 @@ LRESULT CEditEnhancement::OnOkCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl
return TRUE; return TRUE;
} }
CEditGS::CEditGS(CEnhancement::CodeEntries & Entries, CEnhancement::PluginList & PluginList) : CEditGS::CEditGS(CEnhancement::CodeEntries & Entries, CEnhancement::PluginList & PluginList) :
m_Entries(Entries), m_Entries(Entries),
m_PluginList(PluginList) m_PluginList(PluginList)

View File

@ -304,7 +304,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
{ {
if (g_Settings->LoadBool(Setting_AutoStart) == 0) if (g_Settings->LoadBool(Setting_AutoStart) == 0)
{ {
WriteTrace(TraceN64System, TraceDebug, "Manually starting rom"); WriteTrace(TraceN64System, TraceDebug, "Manually starting ROM");
} }
g_BaseSystem->StartEmulation(true); g_BaseSystem->StartEmulation(true);
} }
@ -347,7 +347,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
case ID_SYSTEM_SWAPDISK: case ID_SYSTEM_SWAPDISK:
WriteTrace(TraceUserInterface, TraceDebug, "ID_SYSTEM_SWAPDISK"); WriteTrace(TraceUserInterface, TraceDebug, "ID_SYSTEM_SWAPDISK");
{ {
// Open Disk // Open disk
stdstr FileName = ChooseDiskFileToOpen(hWnd); stdstr FileName = ChooseDiskFileToOpen(hWnd);
if (FileName.length() != 0) if (FileName.length() != 0)
{ {
@ -646,7 +646,7 @@ stdstr CMainMenu::GetFileLastMod(const CPath & FileName)
{ {
SYSTEMTIME stUTC, stLocal; SYSTEMTIME stUTC, stLocal;
// Convert the last-write time to local time. // Convert the last-write time to local time
FileTimeToSystemTime(&LastWriteTime, &stUTC); FileTimeToSystemTime(&LastWriteTime, &stUTC);
SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal); SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal);
@ -679,7 +679,7 @@ std::wstring CMainMenu::GetSaveSlotString(int Slot)
stdstr LastSaveTime; stdstr LastSaveTime;
//check first save name // Check first save name
CPath FileName(g_Settings->LoadStringVal(Directory_InstantSave).c_str(), ""); CPath FileName(g_Settings->LoadStringVal(Directory_InstantSave).c_str(), "");
if (g_Settings->LoadBool(Setting_UniqueSaveDir)) if (g_Settings->LoadBool(Setting_UniqueSaveDir))
{ {
@ -766,7 +766,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
LangMenu.push_back(Item); LangMenu.push_back(Item);
} }
//Go through the settings to create a list of Recent Roms // Go through the settings to create a list of recent ROMS
MenuItemList RecentRomMenu; MenuItemList RecentRomMenu;
DWORD count, RomsToRemember = UISettingsLoadDword(File_RecentGameFileCount); DWORD count, RomsToRemember = UISettingsLoadDword(File_RecentGameFileCount);
@ -782,8 +782,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
RecentRomMenu.push_back(MENU_ITEM(ID_RECENT_ROM_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, MenuString.ToUTF16(CP_ACP).c_str())); RecentRomMenu.push_back(MENU_ITEM(ID_RECENT_ROM_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, MenuString.ToUTF16(CP_ACP).c_str()));
} }
/* Recent Dir // Recent directory
****************/
MenuItemList RecentDirMenu; MenuItemList RecentDirMenu;
DWORD DirsToRemember = UISettingsLoadDword(Directory_RecentGameDirCount); DWORD DirsToRemember = UISettingsLoadDword(Directory_RecentGameDirCount);
@ -800,8 +799,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
RecentDirMenu.push_back(MENU_ITEM(ID_RECENT_DIR_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, MenuString.ToUTF16(CP_ACP).c_str())); RecentDirMenu.push_back(MENU_ITEM(ID_RECENT_DIR_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, MenuString.ToUTF16(CP_ACP).c_str()));
} }
/* File Menu // File menu
****************/
MenuItemList FileMenu; MenuItemList FileMenu;
Item.Reset(ID_FILE_OPEN_ROM, MENU_OPEN, m_ShortCuts.ShortCutString(ID_FILE_OPEN_ROM, RunningState)); Item.Reset(ID_FILE_OPEN_ROM, MENU_OPEN, m_ShortCuts.ShortCutString(ID_FILE_OPEN_ROM, RunningState));
FileMenu.push_back(Item); FileMenu.push_back(Item);
@ -864,8 +862,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
FileMenu.push_back(MENU_ITEM(SPLITER)); FileMenu.push_back(MENU_ITEM(SPLITER));
FileMenu.push_back(MENU_ITEM(ID_FILE_EXIT, MENU_EXIT, m_ShortCuts.ShortCutString(ID_FILE_EXIT, RunningState))); FileMenu.push_back(MENU_ITEM(ID_FILE_EXIT, MENU_EXIT, m_ShortCuts.ShortCutString(ID_FILE_EXIT, RunningState)));
/* Current Save // Current save
****************/
MenuItemList CurrentSaveMenu; MenuItemList CurrentSaveMenu;
DWORD _CurrentSaveState = g_Settings->LoadDword(Game_CurrentSaveState); DWORD _CurrentSaveState = g_Settings->LoadDword(Game_CurrentSaveState);
Item.Reset(ID_CURRENT_SAVE_DEFAULT, EMPTY_STRING, m_ShortCuts.ShortCutString(ID_CURRENT_SAVE_DEFAULT, RunningState), NULL, GetSaveSlotString(0)); Item.Reset(ID_CURRENT_SAVE_DEFAULT, EMPTY_STRING, m_ShortCuts.ShortCutString(ID_CURRENT_SAVE_DEFAULT, RunningState), NULL, GetSaveSlotString(0));
@ -903,8 +900,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
if (_CurrentSaveState == 10) { Item.SetItemTicked(true); } if (_CurrentSaveState == 10) { Item.SetItemTicked(true); }
CurrentSaveMenu.push_back(Item); CurrentSaveMenu.push_back(Item);
/* System Menu // System menu
****************/
MenuItemList SystemMenu; MenuItemList SystemMenu;
MenuItemList ResetMenu; MenuItemList ResetMenu;
if (inBasicMode) if (inBasicMode)
@ -958,8 +954,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
SystemMenu.push_back(MENU_ITEM(ID_SYSTEM_CHEAT, MENU_CHEAT, m_ShortCuts.ShortCutString(ID_SYSTEM_CHEAT, RunningState))); SystemMenu.push_back(MENU_ITEM(ID_SYSTEM_CHEAT, MENU_CHEAT, m_ShortCuts.ShortCutString(ID_SYSTEM_CHEAT, RunningState)));
SystemMenu.push_back(MENU_ITEM(ID_SYSTEM_GSBUTTON, MENU_GS_BUTTON, m_ShortCuts.ShortCutString(ID_SYSTEM_GSBUTTON, RunningState))); SystemMenu.push_back(MENU_ITEM(ID_SYSTEM_GSBUTTON, MENU_GS_BUTTON, m_ShortCuts.ShortCutString(ID_SYSTEM_GSBUTTON, RunningState)));
/* Option Menu // Option menu
****************/
MenuItemList OptionMenu; MenuItemList OptionMenu;
Item.Reset(ID_OPTIONS_FULLSCREEN, MENU_FULL_SCREEN, m_ShortCuts.ShortCutString(ID_OPTIONS_FULLSCREEN, RunningState)); Item.Reset(ID_OPTIONS_FULLSCREEN, MENU_FULL_SCREEN, m_ShortCuts.ShortCutString(ID_OPTIONS_FULLSCREEN, RunningState));
Item.SetItemEnabled(CPURunning); Item.SetItemEnabled(CPURunning);
@ -1014,8 +1009,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
} }
OptionMenu.push_back(MENU_ITEM(ID_OPTIONS_SETTINGS, MENU_SETTINGS, m_ShortCuts.ShortCutString(ID_OPTIONS_SETTINGS, RunningState))); OptionMenu.push_back(MENU_ITEM(ID_OPTIONS_SETTINGS, MENU_SETTINGS, m_ShortCuts.ShortCutString(ID_OPTIONS_SETTINGS, RunningState)));
/* Profile Menu // Profile menu
****************/
MenuItemList DebugProfileMenu; MenuItemList DebugProfileMenu;
if (HaveDebugger()) if (HaveDebugger())
{ {
@ -1030,8 +1024,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
DebugProfileMenu.push_back(Item); DebugProfileMenu.push_back(Item);
} }
/* Debugger Menu // Debugger menu
****************/
MenuItemList DebugMenu; MenuItemList DebugMenu;
MenuItemList DebugLoggingMenu; MenuItemList DebugLoggingMenu;
MenuItemList DebugAppLoggingMenu; MenuItemList DebugAppLoggingMenu;
@ -1041,8 +1034,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
MenuItemList DebugNotificationMenu; MenuItemList DebugNotificationMenu;
if (HaveDebugger()) if (HaveDebugger())
{ {
/* Debug - Interrupt // Debug - Interrupt
*******************/
Item.Reset(ID_DEBUGGER_INTERRUPT_SP, EMPTY_STRING, EMPTY_STDSTR, NULL, L"SP Interrupt"); Item.Reset(ID_DEBUGGER_INTERRUPT_SP, EMPTY_STRING, EMPTY_STDSTR, NULL, L"SP Interrupt");
Item.SetItemEnabled(CPURunning); Item.SetItemEnabled(CPURunning);
DebugInterrupt.push_back(Item); DebugInterrupt.push_back(Item);
@ -1062,8 +1054,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
Item.SetItemEnabled(CPURunning); Item.SetItemEnabled(CPURunning);
DebugInterrupt.push_back(Item); DebugInterrupt.push_back(Item);
/* Debug - R4300i // Debug - R4300i
*******************/
// ID_DEBUGGER_LOGOPTIONS // ID_DEBUGGER_LOGOPTIONS
Item.Reset(ID_DEBUGGER_BREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"&Commands..."); Item.Reset(ID_DEBUGGER_BREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"&Commands...");
@ -1086,8 +1077,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugInterrupt, L"&Generate Interrupt"); Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugInterrupt, L"&Generate Interrupt");
DebugR4300Menu.push_back(Item); DebugR4300Menu.push_back(Item);
/* Debug - Memory // Debug - Memory
****************/
Item.Reset(ID_DEBUGGER_MEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"View..."); Item.Reset(ID_DEBUGGER_MEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"View...");
DebugMemoryMenu.push_back(Item); DebugMemoryMenu.push_back(Item);
Item.Reset(ID_DEBUGGER_SEARCHMEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Search..."); Item.Reset(ID_DEBUGGER_SEARCHMEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Search...");
@ -1101,8 +1091,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
Item.Reset(ID_DEBUGGER_DMALOG, EMPTY_STRING, EMPTY_STDSTR, NULL, L"DMA Log..."); Item.Reset(ID_DEBUGGER_DMALOG, EMPTY_STRING, EMPTY_STDSTR, NULL, L"DMA Log...");
DebugMemoryMenu.push_back(Item); DebugMemoryMenu.push_back(Item);
/* Debug - App logging // Debug - App logging
*******************/
Item.Reset(ID_DEBUGGER_TRACE_MD5, EMPTY_STRING, EMPTY_STDSTR, NULL, L"MD5"); Item.Reset(ID_DEBUGGER_TRACE_MD5, EMPTY_STRING, EMPTY_STDSTR, NULL, L"MD5");
Item.SetItemTicked(g_Settings->LoadDword(Debugger_TraceMD5) == TraceVerbose); Item.SetItemTicked(g_Settings->LoadDword(Debugger_TraceMD5) == TraceVerbose);
DebugAppLoggingMenu.push_back(Item); DebugAppLoggingMenu.push_back(Item);
@ -1181,8 +1170,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
if (g_Settings->LoadBool(Debugger_AppLogFlush)) { Item.SetItemTicked(true); } if (g_Settings->LoadBool(Debugger_AppLogFlush)) { Item.SetItemTicked(true); }
DebugAppLoggingMenu.push_back(Item); DebugAppLoggingMenu.push_back(Item);
/* Debug - Logging // Debug - logging
*******************/
Item.Reset(ID_DEBUGGER_LOGOPTIONS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Log Options..."); Item.Reset(ID_DEBUGGER_LOGOPTIONS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Log Options...");
DebugLoggingMenu.push_back(Item); DebugLoggingMenu.push_back(Item);
@ -1190,8 +1178,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
if (g_Settings->LoadBool(Logging_GenerateLog)) { Item.SetItemTicked(true); } if (g_Settings->LoadBool(Logging_GenerateLog)) { Item.SetItemTicked(true); }
DebugLoggingMenu.push_back(Item); DebugLoggingMenu.push_back(Item);
/* Debugger Main Menu // Debugger main menu
****************/
Item.Reset(ID_DEBUGGER_BREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Commands..."); Item.Reset(ID_DEBUGGER_BREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Commands...");
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
Item.Reset(ID_DEBUGGER_MEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"View Memory..."); Item.Reset(ID_DEBUGGER_MEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"View Memory...");
@ -1201,34 +1188,29 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
DebugMenu.push_back(MENU_ITEM(SPLITER)); DebugMenu.push_back(MENU_ITEM(SPLITER));
/* Debug - Memory // Debug - memory
*******************/
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugMemoryMenu, L"Memory"); Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugMemoryMenu, L"Memory");
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
/* Debug - R4300i // Debug - R4300i
*******************/
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugR4300Menu, L"&R4300i"); Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugR4300Menu, L"&R4300i");
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
/* Debug - RSP // Debug - RSP
*******************/
if (g_Plugins && g_Plugins->RSP() != NULL && IsMenu((HMENU)g_Plugins->RSP()->GetDebugMenu())) if (g_Plugins && g_Plugins->RSP() != NULL && IsMenu((HMENU)g_Plugins->RSP()->GetDebugMenu()))
{ {
Item.Reset(ID_PLUGIN_MENU, EMPTY_STRING, EMPTY_STDSTR, g_Plugins->RSP()->GetDebugMenu(), L"&RSP"); Item.Reset(ID_PLUGIN_MENU, EMPTY_STRING, EMPTY_STDSTR, g_Plugins->RSP()->GetDebugMenu(), L"&RSP");
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
} }
/* Debug - RDP // Debug - RDP
*******************/
if (g_Plugins && g_Plugins->Gfx() != NULL && IsMenu((HMENU)g_Plugins->Gfx()->GetDebugMenu())) if (g_Plugins && g_Plugins->Gfx() != NULL && IsMenu((HMENU)g_Plugins->Gfx()->GetDebugMenu()))
{ {
Item.Reset(ID_PLUGIN_MENU, EMPTY_STRING, EMPTY_STDSTR, g_Plugins->Gfx()->GetDebugMenu(), L"&RDP"); Item.Reset(ID_PLUGIN_MENU, EMPTY_STRING, EMPTY_STDSTR, g_Plugins->Gfx()->GetDebugMenu(), L"&RDP");
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
} }
/* Notification Menu // Notification menu
*******************/
Item.Reset(ID_DEBUG_SHOW_UNHANDLED_MEM, EMPTY_STRING, EMPTY_STDSTR, NULL, L"On Unhandled Memory Actions"); Item.Reset(ID_DEBUG_SHOW_UNHANDLED_MEM, EMPTY_STRING, EMPTY_STDSTR, NULL, L"On Unhandled Memory Actions");
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory))
{ {
@ -1283,7 +1265,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
} }
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
DebugMenu.push_back(MENU_ITEM(SPLITER)); DebugMenu.push_back(MENU_ITEM(SPLITER));
Item.Reset(ID_DEBUG_RECORD_RECOMPILER_ASM, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Record Recompiler Asm"); Item.Reset(ID_DEBUG_RECORD_RECOMPILER_ASM, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Record Recompiler ASM");
if (g_Settings->LoadBool(Debugger_RecordRecompilerAsm)) if (g_Settings->LoadBool(Debugger_RecordRecompilerAsm))
{ {
Item.SetItemTicked(true); Item.SetItemTicked(true);
@ -1291,8 +1273,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
DebugMenu.push_back(Item); DebugMenu.push_back(Item);
} }
/* Help Menu // Help menu
****************/
MenuItemList HelpMenu; MenuItemList HelpMenu;
HelpMenu.push_back(MENU_ITEM(ID_HELP_SUPPORT_PROJECT64, MENU_SUPPORT_PROJECT64)); HelpMenu.push_back(MENU_ITEM(ID_HELP_SUPPORT_PROJECT64, MENU_SUPPORT_PROJECT64));
HelpMenu.push_back(MENU_ITEM(ID_HELP_DISCORD, MENU_DISCORD)); HelpMenu.push_back(MENU_ITEM(ID_HELP_DISCORD, MENU_DISCORD));
@ -1300,8 +1281,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
HelpMenu.push_back(MENU_ITEM(SPLITER)); HelpMenu.push_back(MENU_ITEM(SPLITER));
HelpMenu.push_back(MENU_ITEM(ID_HELP_ABOUT, MENU_ABOUT_PJ64)); HelpMenu.push_back(MENU_ITEM(ID_HELP_ABOUT, MENU_ABOUT_PJ64));
/* Main Title bar Menu // Main title bar Menu
***********************/
MenuItemList MainTitleMenu; MenuItemList MainTitleMenu;
Item.Reset(SUB_MENU, MENU_FILE, EMPTY_STDSTR, &FileMenu); Item.Reset(SUB_MENU, MENU_FILE, EMPTY_STDSTR, &FileMenu);
if (RomLoading) { Item.SetItemEnabled(false); } if (RomLoading) { Item.SetItemEnabled(false); }
@ -1358,13 +1338,13 @@ void CMainMenu::ResetMenu(void)
FillOutMenu(hMenu); FillOutMenu(hMenu);
WriteTrace(TraceUserInterface, TraceDebug, "Create Menu Done"); WriteTrace(TraceUserInterface, TraceDebug, "Create Menu Done");
//save old menu to destroy latter // Save old menu to destroy latter
HMENU OldMenuHandle; HMENU OldMenuHandle;
{ {
CGuard Guard(m_CS); CGuard Guard(m_CS);
OldMenuHandle = m_MenuHandle; OldMenuHandle = m_MenuHandle;
//save handle and re-attach to a window // Save handle and re-attach to a window
WriteTrace(TraceUserInterface, TraceDebug, "Attach Menu"); WriteTrace(TraceUserInterface, TraceDebug, "Attach Menu");
m_MenuHandle = hMenu; m_MenuHandle = hMenu;
} }

View File

@ -3,36 +3,36 @@
enum MainMenuID enum MainMenuID
{ {
//File Menu // File menu
ID_FILE_OPEN_ROM = 4000, ID_FILE_OPEN_COMBO, ID_FILE_ROM_INFO, ID_FILE_STARTEMULATION, ID_FILE_ENDEMULATION, ID_FILE_OPEN_ROM = 4000, ID_FILE_OPEN_COMBO, 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 directory
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_SWAPDISK, ID_SYSTEM_RESTORE, ID_SYSTEM_LOAD, ID_SYSTEM_SAVE, ID_SYSTEM_LIMITFPS, ID_SYSTEM_SWAPDISK, ID_SYSTEM_RESTORE, ID_SYSTEM_LOAD, ID_SYSTEM_SAVE,
ID_SYSTEM_SAVEAS, ID_SYSTEM_ENHANCEMENT, ID_SYSTEM_CHEAT, ID_SYSTEM_GSBUTTON, ID_SYSTEM_SAVEAS, ID_SYSTEM_ENHANCEMENT, 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_RECORD_RECOMPILER_ASM, ID_DEBUG_DISABLE_GAMEFIX, ID_DEBUG_LANGUAGE, ID_DEBUG_RECORD_RECOMPILER_ASM, ID_DEBUG_DISABLE_GAMEFIX, ID_DEBUG_LANGUAGE,
@ -49,10 +49,10 @@ enum MainMenuID
ID_DEBUGGER_TRACE_AUDIO, ID_DEBUGGER_TRACE_REGISTERCACHE, ID_DEBUGGER_TRACE_RECOMPILER, ID_DEBUGGER_TRACE_TLB, ID_DEBUGGER_TRACE_AUDIO, ID_DEBUGGER_TRACE_REGISTERCACHE, ID_DEBUGGER_TRACE_RECOMPILER, ID_DEBUGGER_TRACE_TLB,
ID_DEBUGGER_TRACE_PROTECTEDMEM, ID_DEBUGGER_TRACE_USERINTERFACE, ID_DEBUGGER_TRACE_PROTECTEDMEM, ID_DEBUGGER_TRACE_USERINTERFACE,
//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_SUPPORT_PROJECT64, ID_HELP_DISCORD, ID_HELP_WEBSITE, ID_HELP_ABOUT, ID_HELP_SUPPORT_PROJECT64, ID_HELP_DISCORD, ID_HELP_WEBSITE, ID_HELP_ABOUT,
}; };

View File

@ -56,7 +56,7 @@ CMainGui::CMainGui(bool bMainWindow, const char * WindowTitle) :
} }
} }
//if this fails then it has already been created // If this fails then it has already been created
RegisterWinClass(); RegisterWinClass();
Create(WindowTitle); Create(WindowTitle);
} }
@ -114,7 +114,7 @@ void CMainGui::AddRecentRom(const char * ImagePath)
{ {
if (HIWORD(ImagePath) == NULL) { return; } if (HIWORD(ImagePath) == NULL) { return; }
//Get Information about the stored rom list // Get information about the stored ROM list
size_t MaxRememberedFiles = UISettingsLoadDword(File_RecentGameFileCount); size_t MaxRememberedFiles = UISettingsLoadDword(File_RecentGameFileCount);
strlist RecentGames; strlist RecentGames;
size_t i; size_t i;
@ -128,7 +128,7 @@ void CMainGui::AddRecentRom(const char * ImagePath)
RecentGames.push_back(RecentGame); RecentGames.push_back(RecentGame);
} }
//See if the dir is already in the list if so then move it to the top of the list // See if the directory is already in the list, if so then move it to the top of the list
strlist::iterator iter; strlist::iterator iter;
for (iter = RecentGames.begin(); iter != RecentGames.end(); iter++) for (iter = RecentGames.begin(); iter != RecentGames.end(); iter++)
{ {
@ -207,7 +207,7 @@ void CMainGui::GameLoaded(CMainGui * Gui)
stdstr FileLoc = g_Settings->LoadStringVal(Game_File); stdstr FileLoc = g_Settings->LoadStringVal(Game_File);
if (FileLoc.length() > 0) if (FileLoc.length() > 0)
{ {
WriteTrace(TraceUserInterface, TraceDebug, "Add Recent Rom"); WriteTrace(TraceUserInterface, TraceDebug, "Add Recent ROM");
Gui->AddRecentRom(FileLoc.c_str()); Gui->AddRecentRom(FileLoc.c_str());
Gui->SetWindowCaption(stdstr(g_Settings->LoadStringVal(Rdb_GoodName)).ToUTF16().c_str()); Gui->SetWindowCaption(stdstr(g_Settings->LoadStringVal(Rdb_GoodName)).ToUTF16().c_str());
@ -236,7 +236,7 @@ void CMainGui::GameCpuRunning(CMainGui * Gui)
std::string Status = UISettingsLoadStringVal(Rdb_Status); std::string Status = UISettingsLoadStringVal(Rdb_Status);
char String[100]; char String[100];
RomIniFile.GetString("Rom Status", stdstr_f("%s.AutoFullScreen", Status.c_str()).c_str(), "true", String, sizeof(String)); RomIniFile.GetString("ROM Status", stdstr_f("%s.AutoFullScreen", Status.c_str()).c_str(), "true", String, sizeof(String));
if (_stricmp(String, "true") == 0) if (_stricmp(String, "true") == 0)
{ {
g_Notify->ChangeFullScreen(); g_Notify->ChangeFullScreen();
@ -595,7 +595,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
{ {
case WM_CREATE: case WM_CREATE:
{ {
//record class for future usage // Record class for future usage
LPCREATESTRUCT lpcs = (LPCREATESTRUCT)lParam; LPCREATESTRUCT lpcs = (LPCREATESTRUCT)lParam;
CMainGui * _this = (CMainGui *)lpcs->lpCreateParams; CMainGui * _this = (CMainGui *)lpcs->lpCreateParams;
SetProp(hWnd, L"Class", _this); SetProp(hWnd, L"Class", _this);
@ -603,7 +603,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
_this->m_hMainWindow = hWnd; _this->m_hMainWindow = hWnd;
_this->CreateStatusBar(); _this->CreateStatusBar();
//Move the Main window to the location last executed from or center the window // Move the main window to the location last executed from or center the window
int X = (GetSystemMetrics(SM_CXSCREEN) - _this->Width()) / 2; int X = (GetSystemMetrics(SM_CXSCREEN) - _this->Width()) / 2;
int Y = (GetSystemMetrics(SM_CYSCREEN) - _this->Height()) / 2; int Y = (GetSystemMetrics(SM_CYSCREEN) - _this->Height()) / 2;
@ -663,16 +663,16 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
{ {
if (_this->RomBrowserVisible()) if (_this->RomBrowserVisible())
{ {
// save that browser is maximized // Save that browser is maximized
} }
break; break;
} }
//get the current position of the window // Get the current position of the window
RECT WinRect; RECT WinRect;
GetWindowRect(hWnd, &WinRect); GetWindowRect(hWnd, &WinRect);
//save the location of the window // Save the location of the window
if (_this->RomBrowserVisible()) if (_this->RomBrowserVisible())
{ {
_this->m_SaveRomBrowserPos = true; _this->m_SaveRomBrowserPos = true;

View File

@ -10,7 +10,7 @@
class CGfxPlugin; // Plugin that controls the rendering class CGfxPlugin; // Plugin that controls the rendering
class CAudioPlugin; // Plugin for audio, need the hwnd class CAudioPlugin; // Plugin for audio, need the hwnd
class CControl_Plugin; // Controller needs hwnd to see if it is the focused window class CControl_Plugin; // Controller needs hwnd to see if it is the focused window
class CBaseMenu; //Menu for the gui class CBaseMenu; // Menu for the GUI
class CN64System; class CN64System;
class CriticalSection; class CriticalSection;
@ -88,7 +88,7 @@ private:
void ChangeWinSize(long width, long height); void ChangeWinSize(long width, long height);
void Create(const char * WindowTitle); void Create(const char * WindowTitle);
void CreateStatusBar(void); void CreateStatusBar(void);
void Resize(DWORD fwSizeType, WORD nWidth, WORD nHeight); //responding to WM_SIZE void Resize(DWORD fwSizeType, WORD nWidth, WORD nHeight); // Responding to WM_SIZE
void AddRecentRom(const char * ImagePath); void AddRecentRom(const char * ImagePath);
void SetWindowCaption(const wchar_t * Caption); void SetWindowCaption(const wchar_t * Caption);
void ShowRomBrowser(void); void ShowRomBrowser(void);

View File

@ -68,8 +68,8 @@ public:
CBaseMenu (); CBaseMenu ();
virtual int ProcessAccelerator(HWND hWnd, void * lpMsg ) = 0; // pure virtual draw() function virtual int ProcessAccelerator(HWND hWnd, void * lpMsg ) = 0; // Pure virtual draw() function
virtual bool ProcessMessage(HWND hWnd, DWORD wNotifyCode, DWORD wID) = 0; // pure virtual draw() function virtual bool ProcessMessage(HWND hWnd, DWORD wNotifyCode, DWORD wID) = 0; // Pure virtual draw() function
virtual void ResetMenu(void) = 0; // pure virtual draw() function virtual void ResetMenu(void) = 0; // Pure virtual draw() function
HMENU GetHandle (void) { return m_MenuHandle; } HMENU GetHandle (void) { return m_MenuHandle; }
}; };

View File

@ -419,7 +419,7 @@ void CShortCuts::Load(bool InitialValues)
AddShortCut(ID_CURRENT_SAVE_9, STR_SHORTCUT_SAVESLOT, SAVE_SLOT_9, CMenuShortCutKey::ACCESS_GAME_RUNNING); AddShortCut(ID_CURRENT_SAVE_9, STR_SHORTCUT_SAVESLOT, SAVE_SLOT_9, CMenuShortCutKey::ACCESS_GAME_RUNNING);
AddShortCut(ID_CURRENT_SAVE_10, STR_SHORTCUT_SAVESLOT, SAVE_SLOT_10, CMenuShortCutKey::ACCESS_GAME_RUNNING); AddShortCut(ID_CURRENT_SAVE_10, STR_SHORTCUT_SAVESLOT, SAVE_SLOT_10, CMenuShortCutKey::ACCESS_GAME_RUNNING);
//Option Menu // Option menu
AddShortCut(ID_OPTIONS_FULLSCREEN, STR_SHORTCUT_OPTIONS, MENU_FULL_SCREEN, CMenuShortCutKey::ACCESS_GAME_RUNNING); AddShortCut(ID_OPTIONS_FULLSCREEN, STR_SHORTCUT_OPTIONS, MENU_FULL_SCREEN, CMenuShortCutKey::ACCESS_GAME_RUNNING);
AddShortCut(ID_OPTIONS_ALWAYSONTOP, STR_SHORTCUT_OPTIONS, MENU_ON_TOP, CMenuShortCutKey::ACCESS_NOT_IN_FULLSCREEN); AddShortCut(ID_OPTIONS_ALWAYSONTOP, STR_SHORTCUT_OPTIONS, MENU_ON_TOP, CMenuShortCutKey::ACCESS_NOT_IN_FULLSCREEN);
AddShortCut(ID_OPTIONS_CONFIG_GFX, STR_SHORTCUT_OPTIONS, MENU_CONFG_GFX, CMenuShortCutKey::ACCESS_NOT_IN_FULLSCREEN); AddShortCut(ID_OPTIONS_CONFIG_GFX, STR_SHORTCUT_OPTIONS, MENU_CONFG_GFX, CMenuShortCutKey::ACCESS_NOT_IN_FULLSCREEN);
@ -533,7 +533,7 @@ HACCEL CShortCuts::GetAcceleratorTable(void)
{ {
CGuard CS(m_CS); CGuard CS(m_CS);
//Generate a ACCEL list // Generate an ACCEL list
int size = 0, MaxSize = m_ShortCuts.size() * 5; int size = 0, MaxSize = m_ShortCuts.size() * 5;
ACCEL * AccelList = new ACCEL[MaxSize]; ACCEL * AccelList = new ACCEL[MaxSize];
CMenuShortCutKey::RUNNING_STATE RunningState = CMenuShortCutKey::RunningState(); CMenuShortCutKey::RUNNING_STATE RunningState = CMenuShortCutKey::RunningState();

View File

@ -170,7 +170,7 @@ void CNotificationImp::AddRecentDir(const char * RomDir)
// Validate the passed string // Validate the passed string
if (HIWORD(RomDir) == NULL) { return; } if (HIWORD(RomDir) == NULL) { return; }
//Get Information about the stored rom list // Get information about the stored ROM list
size_t MaxRememberedDirs = UISettingsLoadDword(Directory_RecentGameDirCount); size_t MaxRememberedDirs = UISettingsLoadDword(Directory_RecentGameDirCount);
strlist RecentDirs; strlist RecentDirs;
size_t i; size_t i;
@ -184,7 +184,7 @@ void CNotificationImp::AddRecentDir(const char * RomDir)
RecentDirs.push_back(RecentDir); RecentDirs.push_back(RecentDir);
} }
//See if the dir is already in the list if so then move it to the top of the list // See if the directory is already in the list, if so then move it to the top of the list
strlist::iterator iter; strlist::iterator iter;
for (iter = RecentDirs.begin(); iter != RecentDirs.end(); iter++) for (iter = RecentDirs.begin(); iter != RecentDirs.end(); iter++)
{ {
@ -225,7 +225,7 @@ void CNotificationImp::ShowRomBrowser(void)
if (m_hWnd == NULL) { return; } if (m_hWnd == NULL) { return; }
if (UISettingsLoadBool(RomBrowser_Enabled)) if (UISettingsLoadBool(RomBrowser_Enabled))
{ {
//Display the rom browser //Display the ROM browser
m_hWnd->ShowRomList(); m_hWnd->ShowRomList();
m_hWnd->HighLightLastRom(); m_hWnd->HighLightLastRom();
} }

View File

@ -17,14 +17,14 @@ public:
// Make sure we are not in full screen // Make sure we are not in full screen
void WindowMode(void) const; void WindowMode(void) const;
//Error Messages // Error messages
virtual void DisplayError(const char * Message) const; virtual void DisplayError(const char * Message) const;
virtual void DisplayError(LanguageStringID StringID) const; virtual void DisplayError(LanguageStringID StringID) const;
virtual void FatalError(const char * Message) const; virtual void FatalError(const char * Message) const;
virtual void FatalError(LanguageStringID StringID) const; virtual void FatalError(LanguageStringID StringID) const;
//User Feedback // User feedback
virtual void DisplayWarning(const char * Message) const; virtual void DisplayWarning(const char * Message) const;
virtual void DisplayWarning(LanguageStringID StringID) const; virtual void DisplayWarning(LanguageStringID StringID) const;
@ -33,17 +33,17 @@ public:
virtual void DisplayMessage2(const char * Message) const; virtual void DisplayMessage2(const char * Message) const;
// Ask a Yes/No Question to the user, yes = true, no = false // Ask a yes/no question to the user, yes = true, no = false
virtual bool AskYesNoQuestion(const char * Question) const; virtual bool AskYesNoQuestion(const char * Question) const;
virtual void BreakPoint(const char * FileName, int32_t LineNumber); virtual void BreakPoint(const char * FileName, int32_t LineNumber);
void SetWindowCaption(const wchar_t * Caption); void SetWindowCaption(const wchar_t * Caption);
//Remember roms loaded and Rom Dir selected // Remember ROMS loaded and ROM directory selected
void AddRecentDir(const char * RomDir); void AddRecentDir(const char * RomDir);
//Gui for responses // GUI for responses
void SetMainWindow(CMainGui * Gui); void SetMainWindow(CMainGui * Gui);
void RefreshMenu(void); void RefreshMenu(void);
void HideRomBrowser(void); void HideRomBrowser(void);

View File

@ -141,7 +141,7 @@ private:
static int CALLBACK SelectRomDirCallBack(HWND hwnd, uint32_t uMsg, uint32_t lp, uint32_t lpData); static int CALLBACK SelectRomDirCallBack(HWND hwnd, uint32_t uMsg, uint32_t lp, uint32_t lpData);
static int CALLBACK RomList_CompareItems(uint32_t lParam1, uint32_t lParam2, uint32_t lParamSort); static int CALLBACK RomList_CompareItems(uint32_t lParam1, uint32_t lParam2, uint32_t lParamSort);
//Watch Directory Changed function // Watch directory changed function
HANDLE m_WatchThread, m_WatchStopEvent; HANDLE m_WatchThread, m_WatchStopEvent;
DWORD m_WatchThreadID; DWORD m_WatchThreadID;

View File

@ -93,7 +93,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
SortFieldInfo.Key = index; SortFieldInfo.Key = index;
SortFieldInfo.KeyAscend = UISettingsLoadBoolIndex(RomBrowser_SortAscendingIndex, SortIndex); SortFieldInfo.KeyAscend = UISettingsLoadBoolIndex(RomBrowser_SortAscendingIndex, SortIndex);
//calc new start and end // Calculate new start and end
int32_t LastTestPos = -1; int32_t LastTestPos = -1;
while (Start < End) while (Start < End)
{ {
@ -256,7 +256,7 @@ void CRomBrowser::RomAddedToList(int32_t ListPos)
int32_t index = SendMessage(m_hRomList, LVM_INSERTITEM, 0, (LPARAM)&lvItem); int32_t index = SendMessage(m_hRomList, LVM_INSERTITEM, 0, (LPARAM)&lvItem);
int32_t iItem = ListView_GetNextItem(m_hRomList, -1, LVNI_SELECTED); int32_t iItem = ListView_GetNextItem(m_hRomList, -1, LVNI_SELECTED);
//if the last rom then highlight the item // If the last ROM then highlight the item
if (iItem < 0 && _stricmp(m_RomInfo[ListPos].szFullFileName, m_LastRom.c_str()) == 0) if (iItem < 0 && _stricmp(m_RomInfo[ListPos].szFullFileName, m_LastRom.c_str()) == 0)
{ {
ListView_SetItemState(m_hRomList, index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); ListView_SetItemState(m_hRomList, index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
@ -322,7 +322,7 @@ void CRomBrowser::HighLightLastRom(void)
} }
m_LastRom = UISettingsLoadStringIndex(File_RecentGameFileIndex, 0); m_LastRom = UISettingsLoadStringIndex(File_RecentGameFileIndex, 0);
//Make sure Rom browser is visible // Make sure ROM browser is visible
if (!RomBrowserVisible()) { return; } if (!RomBrowserVisible()) { return; }
LVITEM lvItem; LVITEM lvItem;
@ -335,7 +335,7 @@ void CRomBrowser::HighLightLastRom(void)
lvItem.iItem = index; lvItem.iItem = index;
if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return; } if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return; }
//Get the rom info for that item // Get the ROM info for that item
if (lvItem.lParam < 0 || lvItem.lParam >= (LPARAM)m_RomInfo.size()) if (lvItem.lParam < 0 || lvItem.lParam >= (LPARAM)m_RomInfo.size())
{ {
return; return;
@ -347,7 +347,7 @@ void CRomBrowser::HighLightLastRom(void)
return; return;
} }
//if the last rom then highlight the item // If the last ROM then highlight the item
if (_stricmp(pRomInfo->szFullFileName, m_LastRom.c_str()) == 0) if (_stricmp(pRomInfo->szFullFileName, m_LastRom.c_str()) == 0)
{ {
ListView_SetItemState(m_hRomList, index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); ListView_SetItemState(m_hRomList, index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
@ -387,7 +387,7 @@ void CRomBrowser::ResetRomBrowserColomuns(void)
GetFieldInfo(m_Fields); GetFieldInfo(m_Fields);
//Remove all current coloumns // Remove all current columns
memset(&lvColumn, 0, sizeof(lvColumn)); memset(&lvColumn, 0, sizeof(lvColumn));
lvColumn.mask = LVCF_FMT; lvColumn.mask = LVCF_FMT;
while (ListView_GetColumn(m_hRomList, 0, &lvColumn)) while (ListView_GetColumn(m_hRomList, 0, &lvColumn))
@ -395,7 +395,7 @@ void CRomBrowser::ResetRomBrowserColomuns(void)
ListView_DeleteColumn(m_hRomList, 0); ListView_DeleteColumn(m_hRomList, 0);
} }
//Add Colomuns // Add Columns
lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
lvColumn.fmt = LVCFMT_LEFT; lvColumn.fmt = LVCFMT_LEFT;
lvColumn.pszText = szString; lvColumn.pszText = szString;
@ -879,7 +879,7 @@ void CRomBrowser::RomList_PopupMenu(uint32_t /*pnmh*/)
} }
} }
//Get the current Mouse location // Get the current mouse location
POINT Mouse; POINT Mouse;
GetCursorPos(&Mouse); GetCursorPos(&Mouse);
@ -949,8 +949,8 @@ int32_t CALLBACK CRomBrowser::SelectRomDirCallBack(HWND hwnd, uint32_t uMsg, uin
switch (uMsg) switch (uMsg)
{ {
case BFFM_INITIALIZED: case BFFM_INITIALIZED:
// WParam is TRUE since you are passing a path. // WParam is TRUE since you are passing a path
// It would be FALSE if you were passing a pidl. // It would be FALSE if you were passing a PIDL
if (lpData) if (lpData)
{ {
SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData);
@ -1006,7 +1006,7 @@ void CRomBrowser::SelectRomDir(void)
void CRomBrowser::FixRomListWindow(void) void CRomBrowser::FixRomListWindow(void)
{ {
//Change the window Style // Change the window style
long Style = GetWindowLong(m_MainWindow, GWL_STYLE) | WS_SIZEBOX | WS_MAXIMIZEBOX; long Style = GetWindowLong(m_MainWindow, GWL_STYLE) | WS_SIZEBOX | WS_MAXIMIZEBOX;
SetWindowLong(m_MainWindow, GWL_STYLE, Style); SetWindowLong(m_MainWindow, GWL_STYLE, Style);
@ -1014,7 +1014,7 @@ void CRomBrowser::FixRomListWindow(void)
RECT rect; RECT rect;
GetWindowRect(m_MainWindow, &rect); GetWindowRect(m_MainWindow, &rect);
//We find the middle position of the screen, we use this if theres no setting // We find the middle position of the screen, we use this if there is no setting
int32_t X = (GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) / 2; int32_t X = (GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) / 2;
int32_t Y = (GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) / 2; int32_t Y = (GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) / 2;
@ -1070,7 +1070,7 @@ void CRomBrowser::ShowRomList(void)
InvalidateRect(m_hRomList, NULL, TRUE); InvalidateRect(m_hRomList, NULL, TRUE);
//Start thread to watch for dir changed // Start thread to watch for directory change
WatchThreadStart(); WatchThreadStart();
m_ShowingRomBrowser = false; m_ShowingRomBrowser = false;
} }
@ -1086,7 +1086,7 @@ void CRomBrowser::HideRomList(void)
// Make sure the window does disappear // Make sure the window does disappear
Sleep(100); Sleep(100);
//Disable the rom list // Disable the ROM list
EnableWindow(m_hRomList, FALSE); EnableWindow(m_hRomList, FALSE);
ShowWindow(m_hRomList, SW_HIDE); ShowWindow(m_hRomList, SW_HIDE);
@ -1118,11 +1118,11 @@ bool CRomBrowser::RomDirNeedsRefresh(void)
{ {
bool InWatchThread = (m_WatchThreadID == GetCurrentThreadId()); bool InWatchThread = (m_WatchThreadID == GetCurrentThreadId());
//Get Old MD5 of file names // Get old MD5 of file names
stdstr FileName = g_Settings->LoadStringVal(RomList_RomListCache); stdstr FileName = g_Settings->LoadStringVal(RomList_RomListCache);
if (!CPath(FileName).Exists()) if (!CPath(FileName).Exists())
{ {
//if file does not exist then refresh the data // If file does not exist then refresh the data
return true; return true;
} }
@ -1137,7 +1137,7 @@ bool CRomBrowser::RomDirNeedsRefresh(void)
hFile.Read(&CurrentFileMD5, sizeof(CurrentFileMD5)); hFile.Read(&CurrentFileMD5, sizeof(CurrentFileMD5));
hFile.Close(); hFile.Close();
//Get Current MD5 of file names // Get current MD5 of file names
strlist FileNames; strlist FileNames;
if (!GetRomFileNames(FileNames, CPath(g_Settings->LoadStringVal(RomList_GameDir)), stdstr(""), InWatchThread)) if (!GetRomFileNames(FileNames, CPath(g_Settings->LoadStringVal(RomList_GameDir)), stdstr(""), InWatchThread))
{ {
@ -1205,7 +1205,7 @@ void CRomBrowser::WatchThreadStart(void)
{ {
if (m_WatchThread != NULL) if (m_WatchThread != NULL)
{ {
// thread already running // Thread already running
return; return;
} }
WriteTrace(TraceUserInterface, TraceDebug, "1"); WriteTrace(TraceUserInterface, TraceDebug, "1");

View File

@ -72,7 +72,7 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{ {
//record class for future usage // Record class for future usage
SetProp(hDlg, L"this", (RomInformation *)lParam); SetProp(hDlg, L"this", (RomInformation *)lParam);
RomInformation * _this = (RomInformation *)lParam; RomInformation * _this = (RomInformation *)lParam;

View File

@ -92,7 +92,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
CConfigSettingSection * SettingsSection; CConfigSettingSection * SettingsSection;
//Set the text for all gui Items // Set the text for all GUI items
SetDlgItemText(IDC_RESET_PAGE, wGS(BOTTOM_RESET_PAGE).c_str()); SetDlgItemText(IDC_RESET_PAGE, wGS(BOTTOM_RESET_PAGE).c_str());
SetDlgItemText(IDC_RESET_ALL, wGS(BOTTOM_RESET_ALL).c_str()); SetDlgItemText(IDC_RESET_ALL, wGS(BOTTOM_RESET_ALL).c_str());
SetDlgItemText(IDC_OK, wGS(CHEAT_OK).c_str()); SetDlgItemText(IDC_OK, wGS(CHEAT_OK).c_str());
@ -103,7 +103,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
{ {
if (g_Settings->LoadBool(Setting_RdbEditor)) if (g_Settings->LoadBool(Setting_RdbEditor))
{ {
SetWindowText(stdstr_f("%s ** RDB Edit Mode **", ConfigRomTitle.c_str()).ToUTF16().c_str()); SetWindowText(stdstr_f("%s ** RDB edit mode **", ConfigRomTitle.c_str()).ToUTF16().c_str());
} }
else else
{ {
@ -114,7 +114,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
{ {
if (g_Settings->LoadBool(Setting_RdbEditor)) if (g_Settings->LoadBool(Setting_RdbEditor))
{ {
SetWindowText(stdstr_f("%s ** RDB Edit Mode **", GS(OPTIONS_TITLE)).ToUTF16().c_str()); SetWindowText(stdstr_f("%s ** RDB edit mode **", GS(OPTIONS_TITLE)).ToUTF16().c_str());
} }
else else
{ {
@ -157,7 +157,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
} }
} }
//Game Settings // Game settings
if (!GameIni.empty()) if (!GameIni.empty())
{ {
CConfigSettingSection * GameSettings = new CConfigSettingSection(ConfigRomTitle.ToUTF16().c_str()); CConfigSettingSection * GameSettings = new CConfigSettingSection(ConfigRomTitle.ToUTF16().c_str());
@ -315,7 +315,7 @@ LRESULT CSettingConfig::OnPageListItemChanged(NMHDR* /*phdr*/)
return 0; // retval ignored return 0; // retval ignored
} }
// fallback to using HitTest if TVN_SELCHANGED isn't working // Fallback to using HitTest if TVN_SELCHANGED isn't working
LRESULT CSettingConfig::OnPageListClicked(NMHDR*) LRESULT CSettingConfig::OnPageListClicked(NMHDR*)
{ {
if (m_bTVNSelChangedSupported) if (m_bTVNSelChangedSupported)

View File

@ -119,8 +119,8 @@ int CALLBACK WelcomeScreen::SelectDirCallBack(HWND hwnd, DWORD uMsg, DWORD /*lp*
switch (uMsg) switch (uMsg)
{ {
case BFFM_INITIALIZED: case BFFM_INITIALIZED:
// WParam is TRUE since you are passing a path. // WParam is TRUE since you are passing a path
// It would be FALSE if you were passing a pidl. // It would be FALSE if you were passing a PIDL
if (lpData) if (lpData)
{ {
SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData);