From 23563db02f225508dd1ee23fc14147ee947aa8a5 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 9 Nov 2020 19:42:30 +1030 Subject: [PATCH] Remove about config files --- Lang/English.pj.Lang | 1 - Source/Project64-core/Multilanguage.h | 1 - .../Multilanguage/LanguageClass.cpp | 1 - Source/Project64/UserInterface/MainMenu.cpp | 5 - Source/Project64/UserInterface/MainMenu.h | 2 +- Source/Project64/UserInterface/MainWindow.cpp | 96 ------------------- Source/Project64/UserInterface/MainWindow.h | 25 +---- Source/Project64/UserInterface/UIResources.rc | 30 ------ .../Project64/UserInterface/WelcomeScreen.h | 4 +- Source/Project64/UserInterface/resource.h | 25 ----- 10 files changed, 8 insertions(+), 182 deletions(-) diff --git a/Lang/English.pj.Lang b/Lang/English.pj.Lang index d6f3d8811..92f6e6b0a 100644 --- a/Lang/English.pj.Lang +++ b/Lang/English.pj.Lang @@ -73,7 +73,6 @@ //Help Menu #180# "&Help" -#181# "About Conf&ig Files" #182# "&About Project64" #183# "Support &Forum" #184# "&Website" diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index 6a0c97483..8439332c2 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -103,7 +103,6 @@ enum LanguageStringID //Help Menu MENU_HELP = 180, - MENU_ABOUT_INI = 181, MENU_ABOUT_PJ64 = 182, MENU_WEBSITE = 184, MENU_SUPPORT_PROJECT64 = 185, diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index 7b47209d5..da3a04829 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -110,7 +110,6 @@ void CLanguage::LoadDefaultStrings(void) //Help Menu DEF_STR(MENU_HELP, "&Help"); - DEF_STR(MENU_ABOUT_INI, "About Conf&ig Files"); DEF_STR(MENU_ABOUT_PJ64, "&About Project64"); DEF_STR(MENU_WEBSITE, "&Website"); DEF_STR(MENU_SUPPORT_PROJECT64, "&Support Project64"); diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index 84dc21f38..70bb4be50 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -577,7 +577,6 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI case ID_HELP_DISCORD: ShellExecute(NULL, L"open", L"https://discord.gg/Cg3zquF", NULL, NULL, SW_SHOWMAXIMIZED); break; case ID_HELP_WEBSITE: ShellExecute(NULL, L"open", L"http://www.pj64-emu.com", NULL, NULL, SW_SHOWMAXIMIZED); break; case ID_HELP_ABOUT: m_Gui->AboutBox(); break; - case ID_HELP_ABOUTSETTINGFILES: m_Gui->AboutIniBox(); break; default: if (MenuID >= ID_RECENT_ROM_START && MenuID < ID_RECENT_ROM_END) { @@ -1294,10 +1293,6 @@ void CMainMenu::FillOutMenu(HMENU hMenu) HelpMenu.push_back(MENU_ITEM(ID_HELP_DISCORD, MENU_DISCORD)); HelpMenu.push_back(MENU_ITEM(ID_HELP_WEBSITE, MENU_WEBSITE)); HelpMenu.push_back(MENU_ITEM(SPLITER)); - if (!inBasicMode) - { - HelpMenu.push_back(MENU_ITEM(ID_HELP_ABOUTSETTINGFILES, MENU_ABOUT_INI)); - } HelpMenu.push_back(MENU_ITEM(ID_HELP_ABOUT, MENU_ABOUT_PJ64)); /* Main Title bar Menu diff --git a/Source/Project64/UserInterface/MainMenu.h b/Source/Project64/UserInterface/MainMenu.h index c0490aa37..a4cdde2f8 100644 --- a/Source/Project64/UserInterface/MainMenu.h +++ b/Source/Project64/UserInterface/MainMenu.h @@ -53,7 +53,7 @@ enum MainMenuID ID_PROFILE_PROFILE, ID_PROFILE_RESETCOUNTER, ID_PROFILE_GENERATELOG, //Help Menu - ID_HELP_SUPPORT_PROJECT64, ID_HELP_DISCORD, ID_HELP_WEBSITE, ID_HELP_ABOUTSETTINGFILES, ID_HELP_ABOUT, + ID_HELP_SUPPORT_PROJECT64, ID_HELP_DISCORD, ID_HELP_WEBSITE, ID_HELP_ABOUT, }; class CMainMenu : diff --git a/Source/Project64/UserInterface/MainWindow.cpp b/Source/Project64/UserInterface/MainWindow.cpp index 5eb00a522..6913b8ffb 100644 --- a/Source/Project64/UserInterface/MainWindow.cpp +++ b/Source/Project64/UserInterface/MainWindow.cpp @@ -322,102 +322,6 @@ void CMainGui::AboutBox(void) DialogBoxParamW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_About), m_hMainWindow, (DLGPROC)AboutBoxProc, (LPARAM)this); } -void CMainGui::AboutIniBox(void) -{ - DialogBoxParamW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_About_Ini), m_hMainWindow, (DLGPROC)AboutIniBoxProc, (LPARAM)this); -} - -DWORD CALLBACK AboutIniBoxProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD /*lParam*/) -{ - static wchar_t RDBHomePage[300], CHTHomePage[300], RDXHomePage[300]; - - switch (uMsg) { - case WM_INITDIALOG: - { - wchar_t String[200]; - - //Title - SetWindowTextW(hDlg, wGS(INI_TITLE).c_str()); - - //Language - SetDlgItemTextW(hDlg, IDC_LAN, wGS(INI_CURRENT_LANG).c_str()); - set_about_field(hDlg, IDC_LAN_AUTHOR, wGS(INI_AUTHOR).c_str(), wGS(LANGUAGE_AUTHOR).c_str()); - set_about_field(hDlg, IDC_LAN_VERSION, wGS(INI_VERSION).c_str(), wGS(LANGUAGE_VERSION).c_str()); - set_about_field(hDlg, IDC_LAN_DATE, wGS(INI_DATE).c_str(), wGS(LANGUAGE_DATE).c_str()); - if (wcslen(wGS(LANGUAGE_NAME).c_str()) == 0) - { - EnableWindow(GetDlgItem(hDlg, IDC_LAN), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_LAN_AUTHOR), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_LAN_VERSION), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_LAN_DATE), FALSE); - } - //RDB - CIniFile RdbIniFile(g_Settings->LoadStringVal(SupportFile_RomDatabase).c_str()); - wcsncpy(String, stdstr(RdbIniFile.GetString("Meta", "Author", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0])); - if (wcslen(String) == 0) - { - EnableWindow(GetDlgItem(hDlg, IDC_RDB), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDB_AUTHOR), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDB_VERSION), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDB_DATE), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDB_HOME), FALSE); - } - - set_about_field(hDlg, IDC_RDB_AUTHOR, wGS(INI_AUTHOR).c_str(), String); - - wcsncpy(String, stdstr(RdbIniFile.GetString("Meta", "Version", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0])); - set_about_field(hDlg, IDC_RDB_VERSION, wGS(INI_VERSION).c_str(), String); - wcsncpy(String, stdstr(RdbIniFile.GetString("Meta", "Date", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0])); - set_about_field(hDlg, IDC_RDB_DATE, wGS(INI_DATE).c_str(), String); - wcsncpy(RDBHomePage, stdstr(RdbIniFile.GetString("Meta", "Homepage", "")).ToUTF16().c_str(), sizeof(RDBHomePage) / sizeof(RDBHomePage[0])); - SetDlgItemTextW(hDlg, IDC_RDB_HOME, wGS(INI_HOMEPAGE).c_str()); - if (wcslen(RDBHomePage) == 0) - { - EnableWindow(GetDlgItem(hDlg, IDC_RDB_HOME), FALSE); - } - - //Extended Info - SetDlgItemTextW(hDlg, IDC_RDX, wGS(INI_CURRENT_RDX).c_str()); - CIniFile RdxIniFile(g_Settings->LoadStringVal(SupportFile_ExtInfo).c_str()); - wcsncpy(String, stdstr(RdxIniFile.GetString("Meta", "Author", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0])); - if (wcslen(String) == 0) - { - EnableWindow(GetDlgItem(hDlg, IDC_RDX), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDX_AUTHOR), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDX_VERSION), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDX_DATE), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RDX_HOME), FALSE); - } - set_about_field(hDlg, IDC_RDX_AUTHOR, wGS(INI_AUTHOR).c_str(), String); - wcsncpy(String, stdstr(RdxIniFile.GetString("Meta", "Version", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0])); - set_about_field(hDlg, IDC_RDX_VERSION, wGS(INI_VERSION).c_str(), String); - wcsncpy(String, stdstr(RdxIniFile.GetString("Meta", "Date", "")).ToUTF16().c_str(), sizeof(String) / sizeof(String[0])); - set_about_field(hDlg, IDC_RDX_DATE, wGS(INI_DATE).c_str(), String); - wcsncpy(RDXHomePage, stdstr(RdxIniFile.GetString("Meta", "Homepage", "")).ToUTF16().c_str(), sizeof(RDXHomePage) / sizeof(RDXHomePage[0])); - SetDlgItemTextW(hDlg, IDC_RDX_HOME, wGS(INI_HOMEPAGE).c_str()); - if (wcslen(RDXHomePage) == 0) - { - EnableWindow(GetDlgItem(hDlg, IDC_RDX_HOME), FALSE); - } - SetDlgItemTextW(hDlg, IDOK, wGS(CHEAT_OK).c_str()); - } - break; - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_RDB_HOME: ShellExecuteW(NULL, L"open", RDBHomePage, NULL, NULL, SW_SHOWNORMAL); break; - case IDC_RDX_HOME: ShellExecuteW(NULL, L"open", RDXHomePage, NULL, NULL, SW_SHOWNORMAL); break; - case IDOK: - case IDCANCEL: - EndDialog(hDlg, 0); - break; - } - default: - return FALSE; - } - return TRUE; -} - bool CMainGui::ResetPluginsInUiThread(CPlugins * plugins, CN64System * System) { RESET_PLUGIN info; diff --git a/Source/Project64/UserInterface/MainWindow.h b/Source/Project64/UserInterface/MainWindow.h index 479fc959b..db011cd81 100644 --- a/Source/Project64/UserInterface/MainWindow.h +++ b/Source/Project64/UserInterface/MainWindow.h @@ -52,46 +52,32 @@ public: CMainGui(bool bMainWindow, const char * WindowTitle = ""); ~CMainGui(void); - //Message Processing WPARAM ProcessAllMessages(void); bool ProcessGuiMessages(void); - - //debugging functions void EnterLogOptions(void); - - //Get Information about the window - int Height(void); //Get the Height of the window - int Width(void); //Get the Width of the window + int Height(void); + int Width(void); float DPIScale(HWND hWnd); - //Manipulate the state of the window - void SetPos(int X, int Y); //Move the window to this screen location - void Show(bool ShowWindow); //Show or Hide the current window + void SetPos(int X, int Y); + void Show(bool ShowWindow); void MakeWindowOnTop(bool OnTop); void BringToTop(void); - void Caption(LPCWSTR Caption); //Set the caption of the window + void Caption(LPCWSTR Caption); void SaveWindowLoc(void); - //Menu Function void SetWindowMenu(CBaseMenu * Menu); void RefreshMenu(void); CBaseMenu * GetMenuClass(void) { return m_Menu; } - // Status bar void SetStatusText(int Panel, const wchar_t * Text); void ShowStatusBar(bool ShowBar); - - //About Window - void AboutIniBox(void); void AboutBox(void); - //Plugins bool ResetPluginsInUiThread(CPlugins * plugins, CN64System * System); - //Cheats void DisplayCheatsUI(bool BlockExecution); - //Get Window Handle void * GetWindowHandle(void) const { return m_hMainWindow; } void * GetStatusBar(void) const { return m_hStatusWnd; } void * GetModuleInstance(void) const; @@ -117,7 +103,6 @@ private: void ShowRomBrowser(void); friend DWORD CALLBACK AboutBoxProc(HWND, DWORD, DWORD, DWORD); - friend DWORD CALLBACK AboutIniBoxProc(HWND, DWORD, DWORD, DWORD); static LRESULT CALLBACK MainGui_Proc(HWND, DWORD, DWORD, DWORD); friend void RomBowserEnabledChanged(CMainGui * Gui); diff --git a/Source/Project64/UserInterface/UIResources.rc b/Source/Project64/UserInterface/UIResources.rc index fe0b3c82a..b65b8cc8b 100644 --- a/Source/Project64/UserInterface/UIResources.rc +++ b/Source/Project64/UserInterface/UIResources.rc @@ -365,28 +365,6 @@ BEGIN CONTROL ".usa",IDC_USA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,134,37,10 END -IDD_About_Ini DIALOGEX 0, 0, 186, 188 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About INI Files" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX " Current Language ",IDC_LAN,5,3,175,42 - LTEXT "Author:",IDC_LAN_AUTHOR,13,14,164,10 - LTEXT "Version:",IDC_LAN_VERSION,13,24,164,10 - LTEXT "Date:",IDC_LAN_DATE,13,34,164,10 - GROUPBOX "ROM Database (.RDB)",IDC_RDB,5,46,175,59 - LTEXT "Author:",IDC_RDB_AUTHOR,13,57,164,10 - LTEXT "Version:",IDC_RDB_VERSION,13,67,164,10 - LTEXT "Date:",IDC_RDB_DATE,13,76,164,10 - PUSHBUTTON "visit home page",IDC_RDB_HOME,12,87,163,13 - GROUPBOX "Extended Rom Info (.RDX)",IDC_RDX,6,107,175,59 - LTEXT "Author:",IDC_RDX_AUTHOR,13,117,164,10 - LTEXT "Version:",IDC_RDX_VERSION,13,127,164,10 - LTEXT "Date:",IDC_RDX_DATE,13,137,164,10 - PUSHBUTTON "visit home page",IDC_RDX_HOME,12,149,163,13 - PUSHBUTTON "OK",IDOK,134,168,47,13 -END - IDD_About DIALOGEX 0, 0, 233, 265 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg", 0, 0, 0x1 @@ -1550,14 +1528,6 @@ BEGIN BOTTOMMARGIN, 200 END - IDD_About_Ini, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 181 - END - IDD_About, DIALOG BEGIN END diff --git a/Source/Project64/UserInterface/WelcomeScreen.h b/Source/Project64/UserInterface/WelcomeScreen.h index 7b3695911..e01a87755 100644 --- a/Source/Project64/UserInterface/WelcomeScreen.h +++ b/Source/Project64/UserInterface/WelcomeScreen.h @@ -16,7 +16,7 @@ class WelcomeScreen : public CDialogImpl { public: - BEGIN_MSG_MAP_EX(CEnhancementConfig) + BEGIN_MSG_MAP_EX(WelcomeScreen) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_CTLCOLORSTATIC, OnColorStatic) MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground) @@ -24,7 +24,7 @@ public: COMMAND_ID_HANDLER(IDOK, OnOkCmd) END_MSG_MAP() - enum { IDD = IDD_Lang_Select }; + enum { IDD = IDD_Welcome }; WelcomeScreen(void); diff --git a/Source/Project64/UserInterface/resource.h b/Source/Project64/UserInterface/resource.h index 24aeac452..3a49e4905 100644 --- a/Source/Project64/UserInterface/resource.h +++ b/Source/Project64/UserInterface/resource.h @@ -33,7 +33,6 @@ #define IDD_Settings_ShellInt 139 #define IDD_Settings_RomBrowser 140 #define IDD_About_UserInfo 141 -#define IDD_About_Ini 143 #define IDB_ABOUT_LOGO 143 #define IDB_ABOUT_LOGO_HDPI 144 #define IDD_Settings_General 144 @@ -46,7 +45,6 @@ #define IDD_Debugger_RegGPR 158 #define IDR_CHEAT_MENU 160 #define IDD_Debugger_AddBreakpoint 160 -#define IDD_Lang_Select 161 #define IDD_Welcome 161 #define IDD_Settings_GameRecompiler 162 #define IDD_Settings_GamePlugin 163 @@ -89,7 +87,6 @@ #define IDC_LIST2 1003 #define IDC_CURRENT_KEYS 1003 #define RSP_LIST 1004 -#define IDC_CURRENT_KEYS2 1004 #define RSP_ABOUT 1006 #define IDC_ASSIGN 1006 #define IDC_BTN_CHOOSE_FILE 1006 @@ -251,7 +248,6 @@ #define IDC_ZIP 1092 #define IDC_SETTING_INFO 1092 #define IDC_GOOD_NAME_TEXT 1093 -#define IDC_SETTING_INFO2 1093 #define IDC_FUNCFIND_TEXT 1094 #define IDC_REMEMBER 1095 #define IDC_GFX_NAME 1095 @@ -337,35 +333,18 @@ #define IDC_R14_EDIT 1147 #define IDC_R15_EDIT 1148 #define IDC_SHELL_INT_TEXT 1149 -#define IDC_RDB_HOME 1150 -#define IDC_SHELL_INT_TEXT2 1150 #define IDC_COUNTFACT 1151 -#define IDC_SHELL_INT_TEXT3 1151 -#define IDC_RDX_HOME 1152 -#define IDC_SHELL_INT_TEXT4 1152 #define IDC_MEMORY_SIZE_TEXT 1153 #define IDC_SAVE_TYPE_TEXT 1154 -#define IDC_LAN 1154 -#define IDC_LAN_AUTHOR 1155 -#define IDC_LAN_VERSION 1156 #define IDC_SYNC_AUDIO 1156 #define IDC_USE_TLB 1157 -#define IDC_LAN_DATE 1157 -#define IDC_RDB 1158 #define IDC_UNALIGNED_DMA 1158 -#define IDC_RDB_AUTHOR 1159 #define IDC_RANDOMIZE_SIPI_INTERRUPTS 1159 -#define IDC_RDB_VERSION 1160 #define IDC_PROTECT_MEMORY 1160 -#define IDC_RDB_DATE 1161 #define IDC_R16_EDIT 1165 -#define IDC_RDX 1166 #define IDC_R17_EDIT 1166 -#define IDC_RDX_AUTHOR 1167 #define IDC_R18_EDIT 1167 -#define IDC_RDX_VERSION 1168 #define IDC_R19_EDIT 1168 -#define IDC_RDX_DATE 1169 #define IDC_R20_EDIT 1169 #define IDC_R21_EDIT 1170 #define IDC_R22_EDIT 1171 @@ -389,9 +368,7 @@ #define IDC_ADDBP_BTN 1186 #define IDC_REMOVESYMBOL_BTN 1186 #define IDC_RMBP_BTN 1187 -#define IDC_CHEATSFRAME 1188 #define IDC_CLEARBP_BTN 1188 -#define IDC_ADDCHEATSFRAME 1189 #define IDC_CHEAT_OPTIONS 1190 #define IDC_ROM_NAME 1191 #define IDC_LABEL_OPTIONS 1191 @@ -432,9 +409,7 @@ #define IDC_F14_EDIT 1218 #define IDC_LANG_SEL 1219 #define IDC_F15_EDIT 1219 -#define IDC_IPL_DIR 1220 #define IDC_F16_EDIT 1220 -#define IDC_SELECT_IPL_DIR 1221 #define IDC_F17_EDIT 1221 #define IDC_IPLDIR_TXT 1222 #define IDC_F18_EDIT 1222