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'
]
// 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 _references = [];
const noop = function () { };
@ -85,7 +85,6 @@ const _strongBackingReferences = (function() {
};
}) ();
const GPR_R0 = (1 << 0)
const GPR_AT = (1 << 1)
const GPR_V0 = (1 << 2)
@ -889,7 +888,7 @@ function Socket(fd)
if(fd)
{
// assume this was constructed from Server
// Assume this was constructed from server
_fd = fd;
connected = true;
} else {
@ -950,7 +949,7 @@ function Socket(fd)
_native.read(_fd, _bufferSize, _strongBackingReferences.singleUseCallback(_read));
break;
case 'close':
// note: does nothing if ondata not set
// Note: does nothing if ondata not set
_onclose = callback
break;
}
@ -984,7 +983,7 @@ function Server(settings)
}
// Intermediate callback
// convert clientFd to Socket and accept next client
// convert clientFd to Socket and accept next client
var _acceptClient = function(clientFd)
{
_onconnection(new Socket(clientFd))

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 += "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();
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_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_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);
@ -93,4 +93,4 @@ LRESULT CAboutDlg::OnOkCmd(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/,
{
EndDialog(0);
return TRUE;
}
}

View File

@ -34,4 +34,4 @@ private:
CBitmapPicture m_Logo;
CFont m_BoldFont;
CFont m_TextFont;
};
};

View File

@ -322,11 +322,11 @@ LRESULT CCheatList::OnTreeRClicked(NMHDR* lpnmh)
{
if (g_Settings->LoadBool(UserInterface_BasicMode)) { return true; }
//Work out what item is selected
// Work out what item is selected
TVHITTESTINFO ht = { 0 };
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.y = GET_Y_LPARAM(dwpos);
::MapWindowPoints(HWND_DESKTOP, lpnmh->hwndFrom, &ht.pt, 1);
@ -334,7 +334,7 @@ LRESULT CCheatList::OnTreeRClicked(NMHDR* lpnmh)
TreeView_HitTest(lpnmh->hwndFrom, &ht);
m_hSelectedItem = ht.hItem;
//Show Menu
// Show menu
HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_CHEAT_MENU));
HMENU hPopupMenu = GetSubMenu(hMenu, 0);
POINT Mouse;

View File

@ -186,4 +186,4 @@ private:
bool m_bModal;
enum Dialog_State { CONTRACTED, EXPANDED } m_DialogState;
};
};

View File

@ -5,7 +5,7 @@
#define UNIX_TIME_START 0x019DB1DED53E8000
#define TICKS_PER_SECOND 10000000
//Discord Project64 App ID
// Discord Project64 app ID
#define PJ64_DISCORD_APPID "704794684387491891"
void CDiscord::Init()
@ -38,14 +38,14 @@ static stdstr GetTitle()
void CDiscord::Update(bool bHaveGame)
{
//Variables we use later
//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
// Variables we use later
// Title uses the Rdb_GoodName to display a proper game name over DiscordRPC
// 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 artwork = bHaveGame ? g_Settings->LoadStringVal(Rdb_RPCKey) : "";
//Load Game Into DiscordRPC
DiscordRichPresence discordPresence = {}; //activates DiscordRPC
//Load game into DiscordRPC
DiscordRichPresence discordPresence = {}; // Activates DiscordRPC
if (artwork.empty())
{
discordPresence.largeImageKey = "pj64_icon";
@ -61,7 +61,7 @@ void CDiscord::Update(bool bHaveGame)
discordPresence.details = title.empty() ? "Not in-game" : title.c_str();
discordPresence.startTimestamp = Timestamp();
Discord_UpdatePresence(&discordPresence); //end DiscordRPC
Discord_UpdatePresence(&discordPresence); // End DiscordRPC
}
int64_t CDiscord::Timestamp()
@ -74,4 +74,4 @@ int64_t CDiscord::Timestamp()
li.HighPart = ft.dwHighDateTime;
return (li.QuadPart - UNIX_TIME_START) / TICKS_PER_SECOND;
}
}

View File

@ -10,4 +10,4 @@ public:
static void Init(void);
static void Shutdown(void);
static void Update(bool bHaveGame = true);
};
};

View File

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

View File

@ -157,4 +157,4 @@ LRESULT CALLBACK LogRegProc(HWND hDlg, UINT uMsg, WPARAM /*wParam*/, LPARAM lPar
return FALSE;
}
return TRUE;
}
}

View File

@ -299,12 +299,12 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
case ID_FILE_ROM_INFO: OnRomInfo(hWnd); break;
case ID_FILE_STARTEMULATION:
m_Gui->SaveWindowLoc();
//Now we have created again, we can start up emulation
// Now we have created again, we can start up emulation
if (g_BaseSystem)
{
if (g_Settings->LoadBool(Setting_AutoStart) == 0)
{
WriteTrace(TraceN64System, TraceDebug, "Manually starting rom");
WriteTrace(TraceN64System, TraceDebug, "Manually starting ROM");
}
g_BaseSystem->StartEmulation(true);
}
@ -347,7 +347,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
case ID_SYSTEM_SWAPDISK:
WriteTrace(TraceUserInterface, TraceDebug, "ID_SYSTEM_SWAPDISK");
{
// Open Disk
// Open disk
stdstr FileName = ChooseDiskFileToOpen(hWnd);
if (FileName.length() != 0)
{
@ -646,7 +646,7 @@ stdstr CMainMenu::GetFileLastMod(const CPath & FileName)
{
SYSTEMTIME stUTC, stLocal;
// Convert the last-write time to local time.
// Convert the last-write time to local time
FileTimeToSystemTime(&LastWriteTime, &stUTC);
SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal);
@ -679,7 +679,7 @@ std::wstring CMainMenu::GetSaveSlotString(int Slot)
stdstr LastSaveTime;
//check first save name
// Check first save name
CPath FileName(g_Settings->LoadStringVal(Directory_InstantSave).c_str(), "");
if (g_Settings->LoadBool(Setting_UniqueSaveDir))
{
@ -737,7 +737,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
MENU_ITEM Item;
//Get all flags
// Get all flags
bool inBasicMode = g_Settings->LoadBool(UserInterface_BasicMode);
bool CPURunning = g_Settings->LoadBool(GameRunning_CPU_Running);
bool RomLoading = g_Settings->LoadBool(GameRunning_LoadingInProgress);
@ -751,7 +751,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
RunningState = UISettingsLoadBool(UserInterface_InFullScreen) ? CMenuShortCutKey::RUNNING_STATE_FULLSCREEN : CMenuShortCutKey::RUNNING_STATE_WINDOWED;
}
//Get the system information to make the menu
// Get the system information to make the menu
LanguageList LangList = g_Lang->GetLangList();
MenuItemList LangMenu;
@ -766,7 +766,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
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;
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()));
}
/* Recent Dir
****************/
// Recent directory
MenuItemList RecentDirMenu;
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()));
}
/* File Menu
****************/
// File menu
MenuItemList FileMenu;
Item.Reset(ID_FILE_OPEN_ROM, MENU_OPEN, m_ShortCuts.ShortCutString(ID_FILE_OPEN_ROM, RunningState));
FileMenu.push_back(Item);
@ -864,8 +862,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
FileMenu.push_back(MENU_ITEM(SPLITER));
FileMenu.push_back(MENU_ITEM(ID_FILE_EXIT, MENU_EXIT, m_ShortCuts.ShortCutString(ID_FILE_EXIT, RunningState)));
/* Current Save
****************/
// Current save
MenuItemList CurrentSaveMenu;
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));
@ -903,8 +900,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
if (_CurrentSaveState == 10) { Item.SetItemTicked(true); }
CurrentSaveMenu.push_back(Item);
/* System Menu
****************/
// System menu
MenuItemList SystemMenu;
MenuItemList ResetMenu;
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_GSBUTTON, MENU_GS_BUTTON, m_ShortCuts.ShortCutString(ID_SYSTEM_GSBUTTON, RunningState)));
/* Option Menu
****************/
// Option menu
MenuItemList OptionMenu;
Item.Reset(ID_OPTIONS_FULLSCREEN, MENU_FULL_SCREEN, m_ShortCuts.ShortCutString(ID_OPTIONS_FULLSCREEN, RunningState));
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)));
/* Profile Menu
****************/
// Profile menu
MenuItemList DebugProfileMenu;
if (HaveDebugger())
{
@ -1030,8 +1024,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
DebugProfileMenu.push_back(Item);
}
/* Debugger Menu
****************/
// Debugger menu
MenuItemList DebugMenu;
MenuItemList DebugLoggingMenu;
MenuItemList DebugAppLoggingMenu;
@ -1041,8 +1034,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
MenuItemList DebugNotificationMenu;
if (HaveDebugger())
{
/* Debug - Interrupt
*******************/
// Debug - Interrupt
Item.Reset(ID_DEBUGGER_INTERRUPT_SP, EMPTY_STRING, EMPTY_STDSTR, NULL, L"SP Interrupt");
Item.SetItemEnabled(CPURunning);
DebugInterrupt.push_back(Item);
@ -1062,10 +1054,9 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
Item.SetItemEnabled(CPURunning);
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...");
DebugR4300Menu.push_back(Item);
Item.Reset(ID_DEBUGGER_CPULOG, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Command Log...");
@ -1086,8 +1077,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugInterrupt, L"&Generate Interrupt");
DebugR4300Menu.push_back(Item);
/* Debug - Memory
****************/
// Debug - Memory
Item.Reset(ID_DEBUGGER_MEMORY, EMPTY_STRING, EMPTY_STDSTR, NULL, L"View...");
DebugMemoryMenu.push_back(Item);
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...");
DebugMemoryMenu.push_back(Item);
/* Debug - App logging
*******************/
// Debug - App logging
Item.Reset(ID_DEBUGGER_TRACE_MD5, EMPTY_STRING, EMPTY_STDSTR, NULL, L"MD5");
Item.SetItemTicked(g_Settings->LoadDword(Debugger_TraceMD5) == TraceVerbose);
DebugAppLoggingMenu.push_back(Item);
@ -1181,8 +1170,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
if (g_Settings->LoadBool(Debugger_AppLogFlush)) { Item.SetItemTicked(true); }
DebugAppLoggingMenu.push_back(Item);
/* Debug - Logging
*******************/
// Debug - logging
Item.Reset(ID_DEBUGGER_LOGOPTIONS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Log Options...");
DebugLoggingMenu.push_back(Item);
@ -1190,8 +1178,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
if (g_Settings->LoadBool(Logging_GenerateLog)) { Item.SetItemTicked(true); }
DebugLoggingMenu.push_back(Item);
/* Debugger Main Menu
****************/
// Debugger main menu
Item.Reset(ID_DEBUGGER_BREAKPOINTS, EMPTY_STRING, EMPTY_STDSTR, NULL, L"Commands...");
DebugMenu.push_back(Item);
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));
/* Debug - Memory
*******************/
// Debug - memory
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugMemoryMenu, L"Memory");
DebugMenu.push_back(Item);
/* Debug - R4300i
*******************/
// Debug - R4300i
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugR4300Menu, L"&R4300i");
DebugMenu.push_back(Item);
/* Debug - RSP
*******************/
// Debug - RSP
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");
DebugMenu.push_back(Item);
}
/* Debug - RDP
*******************/
// Debug - RDP
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");
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");
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory))
{
@ -1283,7 +1265,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
}
DebugMenu.push_back(Item);
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))
{
Item.SetItemTicked(true);
@ -1291,8 +1273,7 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
DebugMenu.push_back(Item);
}
/* Help Menu
****************/
// Help menu
MenuItemList HelpMenu;
HelpMenu.push_back(MENU_ITEM(ID_HELP_SUPPORT_PROJECT64, MENU_SUPPORT_PROJECT64));
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(ID_HELP_ABOUT, MENU_ABOUT_PJ64));
/* Main Title bar Menu
***********************/
// Main title bar Menu
MenuItemList MainTitleMenu;
Item.Reset(SUB_MENU, MENU_FILE, EMPTY_STDSTR, &FileMenu);
if (RomLoading) { Item.SetItemEnabled(false); }
@ -1335,7 +1315,7 @@ void CMainMenu::RebuildAccelerators(void)
{
CGuard Guard(m_CS);
//Delete the old accel list
// Delete the old accel list
WriteTrace(TraceUserInterface, TraceDebug, "Start");
HACCEL m_OldAccelTable = (HACCEL)m_AccelTable;
@ -1352,19 +1332,19 @@ void CMainMenu::ResetMenu(void)
WriteTrace(TraceUserInterface, TraceDebug, "Start");
if (!UISettingsLoadBool(UserInterface_InFullScreen))
{
//Create a new window with all the items
// Create a new window with all the items
WriteTrace(TraceUserInterface, TraceDebug, "Create Menu");
HMENU hMenu = CreateMenu();
FillOutMenu(hMenu);
WriteTrace(TraceUserInterface, TraceDebug, "Create Menu Done");
//save old menu to destroy latter
// Save old menu to destroy latter
HMENU OldMenuHandle;
{
CGuard Guard(m_CS);
OldMenuHandle = m_MenuHandle;
//save handle and re-attach to a window
// Save handle and re-attach to a window
WriteTrace(TraceUserInterface, TraceDebug, "Attach Menu");
m_MenuHandle = hMenu;
}
@ -1381,11 +1361,11 @@ void CMainMenu::ResetMenu(void)
}
WriteTrace(TraceUserInterface, TraceDebug, "Destroy Old Menu");
//Destroy the old menu
// Destroy the old menu
DestroyMenu((HMENU)OldMenuHandle);
}
ResetAccelerators();
WriteTrace(TraceUserInterface, TraceDebug, "Done");
}
}

View File

@ -3,36 +3,36 @@
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_ROMDIRECTORY, ID_FILE_REFRESHROMLIST, ID_FILE_EXIT,
//language
// Language
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,
//Recent Dir
// Recent directory
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_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,
//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_6, ID_CURRENT_SAVE_7, ID_CURRENT_SAVE_8, ID_CURRENT_SAVE_9, ID_CURRENT_SAVE_10,
ID_CURRENT_SAVE_DEFAULT,
//Option Menu
// Option menu
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_SETTINGS, ID_OPTIONS_DISPLAY_FR, ID_OPTIONS_CHANGE_FR, ID_OPTIONS_INCREASE_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_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,
@ -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_PROTECTEDMEM, ID_DEBUGGER_TRACE_USERINTERFACE,
//Profile Menu
// Profile menu
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,
};

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();
Create(WindowTitle);
}
@ -114,7 +114,7 @@ void CMainGui::AddRecentRom(const char * ImagePath)
{
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);
strlist RecentGames;
size_t i;
@ -128,7 +128,7 @@ void CMainGui::AddRecentRom(const char * ImagePath)
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;
for (iter = RecentGames.begin(); iter != RecentGames.end(); iter++)
{
@ -207,7 +207,7 @@ void CMainGui::GameLoaded(CMainGui * Gui)
stdstr FileLoc = g_Settings->LoadStringVal(Game_File);
if (FileLoc.length() > 0)
{
WriteTrace(TraceUserInterface, TraceDebug, "Add Recent Rom");
WriteTrace(TraceUserInterface, TraceDebug, "Add Recent ROM");
Gui->AddRecentRom(FileLoc.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);
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)
{
g_Notify->ChangeFullScreen();
@ -595,7 +595,7 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
{
case WM_CREATE:
{
//record class for future usage
// Record class for future usage
LPCREATESTRUCT lpcs = (LPCREATESTRUCT)lParam;
CMainGui * _this = (CMainGui *)lpcs->lpCreateParams;
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->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 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())
{
// save that browser is maximized
// Save that browser is maximized
}
break;
}
//get the current position of the window
// Get the current position of the window
RECT WinRect;
GetWindowRect(hWnd, &WinRect);
//save the location of the window
// Save the location of the window
if (_this->RomBrowserVisible())
{
_this->m_SaveRomBrowserPos = true;
@ -1106,4 +1106,4 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
return TRUE;
}
}

View File

@ -7,10 +7,10 @@
#include <Project64\UserInterface\EnhancementUI.h>
#include <Project64\UserInterface\ProjectSupport.h>
class CGfxPlugin; //Plugin that controls the rendering
class CAudioPlugin; //Plugin for audio, need the hwnd
class CControl_Plugin; //Controller needs hwnd to see if it is the focused window
class CBaseMenu; //Menu for the gui
class CGfxPlugin; // Plugin that controls the rendering
class CAudioPlugin; // Plugin for audio, need the hwnd
class CControl_Plugin; // Controller needs hwnd to see if it is the focused window
class CBaseMenu; // Menu for the GUI
class CN64System;
class CriticalSection;
@ -88,7 +88,7 @@ private:
void ChangeWinSize(long width, long height);
void Create(const char * WindowTitle);
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 SetWindowCaption(const wchar_t * Caption);
void ShowRomBrowser(void);

View File

@ -69,4 +69,4 @@ bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items)
AppendMenu(hMenu, uFlags, ItemID, Text.c_str());
}
return true;
}
}

View File

@ -4,7 +4,7 @@
enum Menu_ID
{
//ControlID
// ControlID
SPLITER, SUB_MENU, NO_ID, ID_PLUGIN_MENU,
};
@ -68,8 +68,8 @@ public:
CBaseMenu ();
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 void ResetMenu(void) = 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 void ResetMenu(void) = 0; // Pure virtual draw() function
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_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_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);
@ -533,7 +533,7 @@ HACCEL CShortCuts::GetAcceleratorTable(void)
{
CGuard CS(m_CS);
//Generate a ACCEL list
// Generate an ACCEL list
int size = 0, MaxSize = m_ShortCuts.size() * 5;
ACCEL * AccelList = new ACCEL[MaxSize];
CMenuShortCutKey::RUNNING_STATE RunningState = CMenuShortCutKey::RunningState();
@ -574,4 +574,4 @@ HACCEL CShortCuts::GetAcceleratorTable(void)
WriteTrace(TraceUserInterface, TraceDebug, "Delete accel list");
delete[] AccelList;
return AccelTable;
}
}

View File

@ -167,10 +167,10 @@ void CNotificationImp::FatalError(const char * Message) const
void CNotificationImp::AddRecentDir(const char * RomDir)
{
//Validate the passed string
// Validate the passed string
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);
strlist RecentDirs;
size_t i;
@ -184,7 +184,7 @@ void CNotificationImp::AddRecentDir(const char * RomDir)
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;
for (iter = RecentDirs.begin(); iter != RecentDirs.end(); iter++)
{
@ -225,7 +225,7 @@ void CNotificationImp::ShowRomBrowser(void)
if (m_hWnd == NULL) { return; }
if (UISettingsLoadBool(RomBrowser_Enabled))
{
//Display the rom browser
//Display the ROM browser
m_hWnd->ShowRomList();
m_hWnd->HighLightLastRom();
}
@ -276,4 +276,4 @@ void CNotificationImp::BreakPoint(const char * FileName, int LineNumber)
g_BaseSystem->CloseCpu();
}
}
}
}

View File

@ -17,14 +17,14 @@ public:
// Make sure we are not in full screen
void WindowMode(void) const;
//Error Messages
// Error messages
virtual void DisplayError(const char * Message) const;
virtual void DisplayError(LanguageStringID StringID) const;
virtual void FatalError(const char * Message) const;
virtual void FatalError(LanguageStringID StringID) const;
//User Feedback
// User feedback
virtual void DisplayWarning(const char * Message) const;
virtual void DisplayWarning(LanguageStringID StringID) const;
@ -33,17 +33,17 @@ public:
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 void BreakPoint(const char * FileName, int32_t LineNumber);
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);
//Gui for responses
// GUI for responses
void SetMainWindow(CMainGui * Gui);
void RefreshMenu(void);
void HideRomBrowser(void);

View File

@ -293,4 +293,4 @@ void CProjectSupport::LoadSupportInfo(void)
}
}
strcpy(m_SupportInfo.MachineID, MachineID.c_str());
}
}

View File

@ -40,4 +40,4 @@ private:
void LoadSupportInfo(void);
SupportInfo m_SupportInfo;
};
};

View File

@ -137,11 +137,11 @@ private:
static void WatchRomDirChanged(CRomBrowser * _this);
static void AddField(ROMBROWSER_FIELDS_LIST & Fields, const char * Name, int32_t Pos, int32_t ID, int32_t Width, LanguageStringID LangID, bool UseDefault);
//Callback
// Callback
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);
//Watch Directory Changed function
// Watch directory changed function
HANDLE m_WatchThread, m_WatchStopEvent;
DWORD m_WatchThreadID;

View File

@ -93,7 +93,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
SortFieldInfo.Key = index;
SortFieldInfo.KeyAscend = UISettingsLoadBoolIndex(RomBrowser_SortAscendingIndex, SortIndex);
//calc new start and end
// Calculate new start and end
int32_t LastTestPos = -1;
while (Start < End)
{
@ -132,7 +132,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
}
else
{
//Find new start
// Find new start
float Left = (float)Start;
float Right = (float)TestPos;
while (Left < Right)
@ -168,7 +168,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
}
Start = (int32_t)((float)Right);
//Find new end
// Find new end
Left = (float)TestPos;
Right = (float)End;
while (Left < Right)
@ -205,7 +205,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
}
}
//Compare end with item to see if we should do it after or before it
// Compare end with item to see if we should do it after or before it
for (int32_t SortIndex = 0; SortIndex < NoOfSortKeys; SortIndex++)
{
std::string SortFieldName = UISettingsLoadStringIndex(RomBrowser_SortFieldIndex, SortIndex);
@ -256,7 +256,7 @@ void CRomBrowser::RomAddedToList(int32_t ListPos)
int32_t index = SendMessage(m_hRomList, LVM_INSERTITEM, 0, (LPARAM)&lvItem);
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)
{
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);
//Make sure Rom browser is visible
// Make sure ROM browser is visible
if (!RomBrowserVisible()) { return; }
LVITEM lvItem;
@ -331,11 +331,11 @@ void CRomBrowser::HighLightLastRom(void)
int32_t ItemCount = ListView_GetItemCount(m_hRomList);
for (int32_t index = 0; index < ItemCount; index++)
{
//Get The next item
// Get The next item
lvItem.iItem = index;
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())
{
return;
@ -347,7 +347,7 @@ void CRomBrowser::HighLightLastRom(void)
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)
{
ListView_SetItemState(m_hRomList, index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
@ -387,7 +387,7 @@ void CRomBrowser::ResetRomBrowserColomuns(void)
GetFieldInfo(m_Fields);
//Remove all current coloumns
// Remove all current columns
memset(&lvColumn, 0, sizeof(lvColumn));
lvColumn.mask = LVCF_FMT;
while (ListView_GetColumn(m_hRomList, 0, &lvColumn))
@ -395,7 +395,7 @@ void CRomBrowser::ResetRomBrowserColomuns(void)
ListView_DeleteColumn(m_hRomList, 0);
}
//Add Colomuns
// Add Columns
lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.pszText = szString;
@ -512,7 +512,7 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam)
FillRect(ditem->hDC, &ditem->rcItem, hBrush);
SetBkMode(ditem->hDC, TRANSPARENT);
//Draw
// Draw
ListView_GetItemRect(m_hRomList, ditem->itemID, &rcItem, LVIR_LABEL);
lvItem.iSubItem = 0;
lvItem.cchTextMax = sizeof(String) / sizeof(String[0]);
@ -824,11 +824,11 @@ void CRomBrowser::RomList_PopupMenu(uint32_t /*pnmh*/)
m_SelectedRom = pRomInfo->szFullFileName;
}
//Load the menu
// Load the menu
HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_POPUP));
HMENU hPopupMenu = (HMENU)GetSubMenu(hMenu, 0);
//Fix up menu
// Fix up menu
MenuSetText(hPopupMenu, 0, wGS(POPUP_PLAY).c_str(), NULL);
MenuSetText(hPopupMenu, 1, wGS(POPUP_PLAYDISK).c_str(), NULL);
MenuSetText(hPopupMenu, 3, wGS(MENU_REFRESH).c_str(), NULL);
@ -879,11 +879,11 @@ void CRomBrowser::RomList_PopupMenu(uint32_t /*pnmh*/)
}
}
//Get the current Mouse location
// Get the current mouse location
POINT Mouse;
GetCursorPos(&Mouse);
//Show the menu
// Show the menu
TrackPopupMenu(hPopupMenu, 0, Mouse.x, Mouse.y, 0, m_MainWindow, NULL);
DestroyMenu(hMenu);
}
@ -949,8 +949,8 @@ int32_t CALLBACK CRomBrowser::SelectRomDirCallBack(HWND hwnd, uint32_t uMsg, uin
switch (uMsg)
{
case BFFM_INITIALIZED:
// WParam is TRUE since you are passing a path.
// It would be FALSE if you were passing a pidl.
// WParam is TRUE since you are passing a path
// It would be FALSE if you were passing a PIDL
if (lpData)
{
SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData);
@ -1006,25 +1006,25 @@ void CRomBrowser::SelectRomDir(void)
void CRomBrowser::FixRomListWindow(void)
{
//Change the window Style
// Change the window style
long Style = GetWindowLong(m_MainWindow, GWL_STYLE) | WS_SIZEBOX | WS_MAXIMIZEBOX;
SetWindowLong(m_MainWindow, GWL_STYLE, Style);
//Get the current window size
// Get the current window size
RECT 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 Y = (GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) / 2;
//Load the value from settings, if none is available, default to above
// Load the value from settings, if none is available, default to above
UISettingsLoadDword(RomBrowser_Top, (uint32_t &)Y);
UISettingsLoadDword(RomBrowser_Left, (uint32_t &)X);
SetWindowPos(m_MainWindow, NULL, X, Y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
//Fix height and width
// Fix height and width
int32_t Width = UISettingsLoadDword(RomBrowser_Width);
int32_t Height = UISettingsLoadDword(RomBrowser_Height);
@ -1055,11 +1055,11 @@ void CRomBrowser::ShowRomList(void)
FixRomListWindow();
m_AllowSelectionLastRom = true;
//Make sure selected item is visible
// Make sure selected item is visible
int32_t iItem = ListView_GetNextItem(m_hRomList, -1, LVNI_SELECTED);
ListView_EnsureVisible(m_hRomList, iItem, FALSE);
//Mark the window as visible
// Mark the window as visible
m_Visible = true;
RECT rcWindow;
@ -1070,7 +1070,7 @@ void CRomBrowser::ShowRomList(void)
InvalidateRect(m_hRomList, NULL, TRUE);
//Start thread to watch for dir changed
// Start thread to watch for directory change
WatchThreadStart();
m_ShowingRomBrowser = false;
}
@ -1083,20 +1083,20 @@ void CRomBrowser::HideRomList(void)
SaveRomListColoumnInfo();
WatchThreadStop();
//Make sure the window does disappear
// Make sure the window does disappear
Sleep(100);
//Disable the rom list
// Disable the ROM list
EnableWindow(m_hRomList, FALSE);
ShowWindow(m_hRomList, SW_HIDE);
if (UISettingsLoadBool(RomBrowser_Maximized)) { ShowWindow(m_MainWindow, SW_RESTORE); }
//Change the window style
// Change the window style
long Style = GetWindowLong(m_MainWindow, GWL_STYLE) & ~(WS_SIZEBOX | WS_MAXIMIZEBOX);
SetWindowLong(m_MainWindow, GWL_STYLE, Style);
//Move window to correct location
// Move window to correct location
RECT rect;
GetWindowRect(m_MainWindow, &rect);
int32_t X = (GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) / 2;
@ -1105,10 +1105,10 @@ void CRomBrowser::HideRomList(void)
UISettingsLoadDword(UserInterface_MainWindowLeft, (uint32_t &)X);
SetWindowPos(m_MainWindow, NULL, X, Y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
//Mark the window as not visible
// Mark the window as not visible
m_Visible = false;
//Make the main window visible again
// Make the main window visible again
ShowWindow(m_MainWindow, SW_SHOW);
BringWindowToTop(m_MainWindow);
PostMessage(m_MainWindow, WM_MAKE_FOCUS, 0, 0);
@ -1118,18 +1118,18 @@ bool CRomBrowser::RomDirNeedsRefresh(void)
{
bool InWatchThread = (m_WatchThreadID == GetCurrentThreadId());
//Get Old MD5 of file names
// Get old MD5 of file names
stdstr FileName = g_Settings->LoadStringVal(RomList_RomListCache);
if (!CPath(FileName).Exists())
{
//if file does not exist then refresh the data
// If file does not exist then refresh the data
return true;
}
CFile hFile(FileName.c_str(), CFileBase::modeRead);
if (!hFile.IsOpen())
{
//Could not validate, assume it is fine
// Could not validate, assume it is fine
return false;
}
@ -1137,7 +1137,7 @@ bool CRomBrowser::RomDirNeedsRefresh(void)
hFile.Read(&CurrentFileMD5, sizeof(CurrentFileMD5));
hFile.Close();
//Get Current MD5 of file names
// Get current MD5 of file names
strlist FileNames;
if (!GetRomFileNames(FileNames, CPath(g_Settings->LoadStringVal(RomList_GameDir)), stdstr(""), InWatchThread))
{
@ -1205,7 +1205,7 @@ void CRomBrowser::WatchThreadStart(void)
{
if (m_WatchThread != NULL)
{
// thread already running
// Thread already running
return;
}
WriteTrace(TraceUserInterface, TraceDebug, "1");

View File

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

View File

@ -92,7 +92,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
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_ALL, wGS(BOTTOM_RESET_ALL).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))
{
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
{
@ -114,7 +114,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
{
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
{
@ -157,7 +157,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
}
}
//Game Settings
// Game settings
if (!GameIni.empty())
{
CConfigSettingSection * GameSettings = new CConfigSettingSection(ConfigRomTitle.ToUTF16().c_str());
@ -315,7 +315,7 @@ LRESULT CSettingConfig::OnPageListItemChanged(NMHDR* /*phdr*/)
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*)
{
if (m_bTVNSelChangedSupported)

View File

@ -32,4 +32,4 @@ private:
CHyperLink m_RequestLink;
CProjectSupport & m_Support;
};
};

View File

@ -189,4 +189,4 @@ LRESULT CSupportWindow::OnEnterCode(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndC
EndDialog(wID);
}
return TRUE;
}
}

View File

@ -48,4 +48,4 @@ private:
uint32_t m_TimeOutTime;
HWND m_hParent;
static CSupportWindow * m_this;
};
};

View File

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

View File

@ -33,4 +33,4 @@ private:
static int CALLBACK SelectDirCallBack(HWND hwnd, DWORD uMsg, DWORD lp, DWORD lpData);
CBitmapPicture m_Logo;
};
};