From cf4194fef7c0e1e1cbd16b19a7ee823d061066b2 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Wed, 22 Mar 2017 18:15:07 +0000 Subject: [PATCH] pcsx2: Remove unused Windows files There's actually more (old cheats and patch browser?), but I don't know whether they'd be useful so I'll leave those alone for now. --- pcsx2/CMakeLists.txt | 2 - pcsx2/windows/VCprojects/pcsx2.props | 23 -- pcsx2/windows/VCprojects/pcsx2.vcxproj | 1 - .../windows/VCprojects/pcsx2.vcxproj.filters | 6 - pcsx2/windows/WinSysExec.cpp | 21 -- pcsx2/windows/ini.cpp | 323 ------------------ pcsx2/windows/uninstall.ico | Bin 4710 -> 0 bytes 7 files changed, 376 deletions(-) delete mode 100644 pcsx2/windows/VCprojects/pcsx2.props delete mode 100644 pcsx2/windows/WinSysExec.cpp delete mode 100644 pcsx2/windows/ini.cpp delete mode 100644 pcsx2/windows/uninstall.ico diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 40d7071b01..dc3efb50bc 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -489,14 +489,12 @@ set(pcsx2WindowsSources windows/cheats/cheats.cpp windows/DwmSetup.cpp windows/FlatFileReaderWindows.cpp - windows/ini.cpp windows/Optimus.cpp windows/PatchBrowser.cpp windows/VCprojects/IopSif.cpp windows/WinCompressNTFS.cpp windows/WinConsolePipe.cpp windows/WinKeyCodes.cpp - windows/WinSysExec.cpp ) # Windows headers diff --git a/pcsx2/windows/VCprojects/pcsx2.props b/pcsx2/windows/VCprojects/pcsx2.props deleted file mode 100644 index 519536d06a..0000000000 --- a/pcsx2/windows/VCprojects/pcsx2.props +++ /dev/null @@ -1,23 +0,0 @@ - - - - - <_PropertySheetDisplayName>pcsx2 - - - - Use - PrecompiledHeader.h - ..;../..;../libs;../../x86;../../IPU;%(AdditionalIncludeDirectories) - Async - - - ..\libs;%(AdditionalLibraryDirectories) - gnu_gettext.lib;w32pthreads.lib;zlib.lib;comctl32.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies) - - - "$(SolutionDir)common\vsprops\preBuild.cmd" "$(ProjectDir)..\.." - - - - \ No newline at end of file diff --git a/pcsx2/windows/VCprojects/pcsx2.vcxproj b/pcsx2/windows/VCprojects/pcsx2.vcxproj index 5be8b5ee99..5bcca5f99e 100644 --- a/pcsx2/windows/VCprojects/pcsx2.vcxproj +++ b/pcsx2/windows/VCprojects/pcsx2.vcxproj @@ -340,7 +340,6 @@ - diff --git a/pcsx2/windows/VCprojects/pcsx2.vcxproj.filters b/pcsx2/windows/VCprojects/pcsx2.vcxproj.filters index 55c658956f..3bba29a54c 100644 --- a/pcsx2/windows/VCprojects/pcsx2.vcxproj.filters +++ b/pcsx2/windows/VCprojects/pcsx2.vcxproj.filters @@ -118,9 +118,6 @@ {5e741f2d-9e0b-4e43-b2a2-44a8370e1546} - - {3c918e82-4f67-4058-9818-4aff906dfa4a} - {c5237754-2509-4291-b869-c5dacc1a8aba} @@ -566,9 +563,6 @@ System\Ps2\iCore - - System\Windows - System\IsoFS diff --git a/pcsx2/windows/WinSysExec.cpp b/pcsx2/windows/WinSysExec.cpp deleted file mode 100644 index 462515651e..0000000000 --- a/pcsx2/windows/WinSysExec.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2010 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with PCSX2. - * If not, see . - */ - -#include "PrecompiledHeader.h" -#include "Win32.h" -#include - -#include "Common.h" -#include "Utilities/PageFaultSource.h" diff --git a/pcsx2/windows/ini.cpp b/pcsx2/windows/ini.cpp deleted file mode 100644 index 411875d50e..0000000000 --- a/pcsx2/windows/ini.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2003 Pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "Win32.h" - -#include "Common.h" -#include "Paths.h" - -static const u32 IniVersion = 102; - -const char* g_CustomConfigFile; -//char g_WorkingFolder[g_MaxPath]; // Working folder at application startup - -// Returns TRUE if the user has invoked the -cfg command line option. -static bool hasCustomConfig() -{ - return (g_CustomConfigFile != NULL) && (g_CustomConfigFile[0] != 0); -} - -// Returns the FULL (absolute) path and filename of the configuration file. -static wxString GetConfigFilename() -{ - // Load a user-specified configuration, or use the ini relative to the application's working directory. - // (Our current working directory can change, so we use the one we detected at startup) - - return Path::Combine( Config.Paths.Working, hasCustomConfig() ? g_CustomConfigFile : (DEFAULT_INIS_DIR "\\pcsx2.ini") ); -} - -////////////////////////////////////////////////////////////////////////////////////////// -// InitFileLoader - -IniFileLoader::~IniFileLoader() {} -IniFileLoader::IniFileLoader() : IniFile(), - m_workspace( 4096, "IniFileLoader Workspace" ) -{ -} - -void IniFileLoader::Entry( const wxString& var, wxString& value, const wxString& defvalue ) -{ - int retval = GetPrivateProfileString( - m_section.c_str(), var.c_str(), defvalue.c_str(), m_workspace.GetPtr(), m_workspace.GetLength(), m_filename.c_str() - ); - - if( retval >= m_workspace.GetLength() - 2 ) - Console::Notice( "Loadini Warning > Possible truncated value on key '%hs'", params &var ); - //Console::WriteLn( "WTF!! %s ", params m_workspace.GetPtr() ); - value = m_workspace.GetPtr(); -} - -void IniFileLoader::Entry( const wxString& var, char (&value)[g_MaxPath], const wxString& defvalue ) -{ - int retval = GetPrivateProfileString( - m_section.c_str(), var.c_str(), defvalue.c_str(), value, sizeof( value ), m_filename.c_str() - ); - - if( retval >= sizeof(value) - 2 ) - Console::Notice( "Loadini Warning > Possible truncated value on key '%hs'", params &var ); -} - -void IniFileLoader::Entry( const wxString& var, int& value, const int defvalue ) -{ - wxString retval; - Entry( var, retval, to_string( defvalue ) ); - value = atoi( retval.c_str() ); -} - -void IniFileLoader::Entry( const wxString& var, uint& value, const uint defvalue ) -{ - wxString retval; - Entry( var, retval, to_string( defvalue ) ); - value = atoi( retval.c_str() ); -} - -void IniFileLoader::Entry( const wxString& var, bool& value, const bool defvalue ) -{ - wxString retval; - Entry( var, retval, defvalue ? "enabled" : "disabled" ); - value = (retval == "enabled"); -} - -void IniFileLoader::EnumEntry( const wxString& var, int& value, const char* const* enumArray, const int defvalue ) -{ - wxString retval; - Entry( var, retval, enumArray[defvalue] ); - - int i=0; - while( enumArray[i] != NULL && ( retval != enumArray[i] ) ) i++; - - if( enumArray[i] == NULL ) - { - Console::Notice( "Loadini Warning > Unrecognized value '%hs' on key '%hs'\n\tUsing the default setting of '%s'.", - params &retval, &var, enumArray[defvalue] ); - value = defvalue; - } - else - value = i; -} - -////////////////////////////////////////////////////////////////////////////////////////// -// InitFileSaver - -IniFileSaver::~IniFileSaver() {} - -IniFileSaver::IniFileSaver() : IniFile() -{ - char versionStr[20]; - _itoa( IniVersion, versionStr, 10 ); - WritePrivateProfileString( "Misc", "IniVersion", versionStr, m_filename.c_str() ); -} - -void IniFileSaver::Entry( const wxString& var, const wxString& value, const wxString& defvalue ) -{ - WritePrivateProfileString( m_section.c_str(), var.c_str(), value.c_str(), m_filename.c_str() ); -} - -void IniFileSaver::Entry( const wxString& var, wxString& value, const wxString& defvalue ) -{ - WritePrivateProfileString( m_section.c_str(), var.c_str(), value.c_str(), m_filename.c_str() ); -} - -void IniFileSaver::Entry( const wxString& var, char (&value)[g_MaxPath], const wxString& defvalue ) -{ - WritePrivateProfileString( m_section.c_str(), var.c_str(), value, m_filename.c_str() ); -} - -void IniFileSaver::Entry( const wxString& var, int& value, const int defvalue ) -{ - Entry( var, to_string( value ) ); -} - -void IniFileSaver::Entry( const wxString& var, uint& value, const uint defvalue ) -{ - Entry( var, to_string( value ) ); -} - -void IniFileSaver::Entry( const wxString& var, bool& value, const bool defvalue ) -{ - Entry( var, value ? "enabled" : "disabled" ); -} - -void IniFileSaver::EnumEntry( const wxString& var, int& value, const char* const* enumArray, const int defvalue ) -{ - Entry( var, enumArray[value] ); -} - -////////////////////////////////////////////////////////////////////////////////////////// -// InitFile -- Base class implementation. - -IniFile::~IniFile() {} -IniFile::IniFile() : m_filename( GetConfigFilename() ), m_section("Misc") -{ -} - -void IniFile::SetCurrentSection( const wxString& newsection ) -{ - m_section = newsection; -} - -void IniFile::DoConfig( PcsxConfig& Conf ) -{ - SetCurrentSection( "Misc" ); - - Entry( "Blockdump", Conf.Blockdump, false ); - - Entry( "Patching", Conf.Patch, false ); - Entry( "GameFixes", Conf.GameFixes); - -#ifdef PCSX2_DEVBUILD - Entry( "DevLogFlags", (uint&)varLog ); -#endif - - //interface - SetCurrentSection( "Interface" ); - Entry( "Bios", Conf.Bios ); - Entry( "Language", Conf.Lang ); - wxString plug = DEFAULT_PLUGINS_DIR; - Entry( "PluginsDir", Conf.Paths.Plugins, plug ); - wxString bios = DEFAULT_BIOS_DIR; - Entry( "BiosDir", Conf.Paths.Bios, bios ); - Entry( "CloseGsOnEscape", Conf.closeGSonEsc, true ); - - SetCurrentSection( "Console" ); - Entry( "ConsoleWindow", Conf.PsxOut, true ); - Entry( "Profiler", Conf.Profiler, false ); - Entry( "CdvdVerbose", Conf.cdvdPrint, false ); - - SetCurrentSection( "Framelimiter" ); - Entry( "CustomFps", Conf.CustomFps ); - Entry( "FrameskipMode", Conf.CustomFrameSkip ); - Entry( "ConsecutiveFramesToRender", Conf.CustomConsecutiveFrames ); - Entry( "ConsecutiveFramesToSkip", Conf.CustomConsecutiveSkip ); - - MemcardSettings( Conf ); - - SetCurrentSection( "Plugins" ); - - Entry( "GS", Conf.Plugins.GS ); - Entry( "SPU2", Conf.Plugins.SPU2 ); - Entry( "CDVD", Conf.Plugins.CDVD ); - Entry( "PAD1", Conf.Plugins.PAD1 ); - Entry( "PAD2", Conf.Plugins.PAD2 ); - Entry( "DEV9", Conf.Plugins.DEV9 ); - Entry( "USB", Conf.Plugins.USB ); - Entry( "FW", Conf.Plugins.FW ); - - //cpu - SetCurrentSection( "Cpu" ); - Entry( "Options", Conf.Options, PCSX2_EEREC|PCSX2_VU0REC|PCSX2_VU1REC|PCSX2_GSMULTITHREAD|PCSX2_FRAMELIMIT_LIMIT ); - Entry( "sseMXCSR", Conf.sseMXCSR, DEFAULT_sseMXCSR ); - Entry( "sseVUMXCSR", Conf.sseVUMXCSR, DEFAULT_sseVUMXCSR ); - Entry( "eeOptions", Conf.eeOptions, DEFAULT_eeOptions ); - Entry( "vuOptions", Conf.vuOptions, DEFAULT_vuOptions ); - - SetCurrentSection("Hacks"); - Entry("EECycleRate", Config.Hacks.EECycleRate); - if (Config.Hacks.EECycleRate > 2) - Config.Hacks.EECycleRate = 2; - Entry("IOPCycleDouble", Config.Hacks.IOPCycleDouble); - //Entry("WaitCycleExt", Config.Hacks.WaitCycleExt); - Entry("INTCSTATSlow", Config.Hacks.INTCSTATSlow); - Entry("VUCycleSteal", Config.Hacks.VUCycleSteal); - Entry("vuFlagHack", Config.Hacks.vuFlagHack); - Entry("vuMinMax", Config.Hacks.vuMinMax); - Entry("IdleLoopFF", Config.Hacks.IdleLoopFF); - if (Conf.Hacks.VUCycleSteal < 0 || Conf.Hacks.VUCycleSteal > 4) - Conf.Hacks.VUCycleSteal = 0; - Entry("ESCExits", Config.Hacks.ESCExits); -} - -////////////////////////////////////////////////////////////////////////////////////////// -// Public API -- LoadConfig / SaveConfig - -bool LoadConfig() -{ - bool status = true; - - wxString szIniFile( GetConfigFilename() ); - - if( !Path::Exists( szIniFile ) ) - { - if( hasCustomConfig() ) - { - // using custom config, so fail outright: - throw Exception::FileNotFound( - "User-specified configuration file not found:\n\t%s\n\nPCSX2 will now exit." - ); - } - - // standard mode operation. Create the directory. - Path::CreateDirectory( "inis" ); - status = false; // inform caller that we're not configured. - } - else - { - // sanity check to make sure the user doesn't have some kind of - // crazy ass setup... why not! - - if( Path::IsDirectory( szIniFile ) ) - throw Exception::Stream( - "Cannot open or create the Pcsx2 ini file because a directory of\n" - "the same name already exists! Please delete it or reinstall Pcsx2\n" - "fresh and try again." - ); - - // Ini Version check! ----> - // If the user's ini is old, give them a friendly warning that says they should - // probably delete it. - - char versionStr[20]; - u32 version; - - GetPrivateProfileString( "Misc", "IniVersion", NULL, versionStr, 20, szIniFile.c_str() ); - version = atoi( versionStr ); - if( version < IniVersion ) - { - // Warn the user of a version mismatch. - Msgbox::Alert( - "Configuration versions do not match. Pcsx2 may be unstable.\n" - "If you experience problems, delete the pcsx2.ini file from the ini dir." - ); - - // save the new version -- gets rid of the warning on subsequent startups - _itoa( IniVersion, versionStr, 10 ); - WritePrivateProfileString( "Misc", "IniVersion", versionStr, szIniFile.c_str() ); - } - } - - IniFileLoader().DoConfig( Config ); - - return status; -} - -void SaveConfig() -{ - PcsxConfig tmpConf = Config; - - strcpy( tmpConf.Plugins.GS, winConfig.Plugins.GS ); - strcpy( tmpConf.Plugins.SPU2, winConfig.Plugins.SPU2 ); - strcpy( tmpConf.Plugins.CDVD, winConfig.Plugins.CDVD ); - strcpy( tmpConf.Plugins.PAD1, winConfig.Plugins.PAD1 ); - strcpy( tmpConf.Plugins.PAD2, winConfig.Plugins.PAD2 ); - strcpy( tmpConf.Plugins.DEV9, winConfig.Plugins.DEV9 ); - strcpy( tmpConf.Plugins.USB, winConfig.Plugins.USB ); - strcpy( tmpConf.Plugins.FW, winConfig.Plugins.FW ); - - IniFileSaver().DoConfig( tmpConf ); -} - diff --git a/pcsx2/windows/uninstall.ico b/pcsx2/windows/uninstall.ico deleted file mode 100644 index f2308d021f895790036e2e16c614eb61bb59ee49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4710 zcmeHKYgAO%75;`vGNkFM)Ff?vv|vnaXqSzxX-nGGh3P_KnujhMR+H3XL<6Rhh)TGw zB{CzyGGZ#2kW?yB6i^&rAmw3WWF@zw3m`^mVbiLn21<)TNJf;ld5EF zdzz+zWA0J?c1?j&Ihq*ud>Zl5SQZ~I^4K~dUgT^zOyq)H(21Ps6D7|2^}`ZpN-n;@ zr3+JY)PL~VctOp@Ymz6nthBF)*AxUk`sDCyG~s85F@g#rPbDvM(k0F*wZz+Hg5Xl5WZk`l-LOtqqRW zRyaF4;N^MnHXDX--^OTvKiKFfgn~UJZxqY-OD+2 z=_@hD52B~K3a#f0X^tK^tj%aE$;Uu@3vL_A(SM^3eO2^49gP^j)eMjELwKt{0W)X8 zWz52a`BMzmp2ld!F1RlL6Rs~(F;=+;W4bg<==Z^G$iPt5M_~1bP+ydRiKep{xpofy zXV&9R@g@wGZ3BNk0YeuPAzXeR-m7_V-z)=Pm4@+#Z1jBb5xh4vm}t8IPxlw_jP!vw zron5a`)w}<>nH*1EC;(|!Ek>EhHEpydM<#u?ts}o2eVgz-MU22b{P%YLm2D12-a7H z@$OQvejSZ7fH{otI?QkncVfUwIR~zwzA_(P!45WP0voyt?{Et|P9w!N@Q(Gu)u)Ar zCvCV6V*@&jJF98!8{r+KVpQ2LWun8J*Tj;#a{YnlR|7 zp}s9JRGk9zbQ5k8+E7$@2+Z3`zcnj(-U7S58WziW;+-fj&m-SMu%V#f-{fx-da-~1 zZt{1qdv_xF0Rr6v8zPJlXl^!!4I84ce*HR%C$Mwp4)PxK_1#8X+-8csaI=1Bb%o@I zFd(#GjPeb*yD&oeZVp&*sk;PqUDX(HIdHc1Bre%5LS;(A;if}C7JYjT2O#)FFqRcB z!>aSE@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