From 71bf0527d97f68a03ee213ccf24a8e8ec06d1ca4 Mon Sep 17 00:00:00 2001 From: Souryo Date: Sun, 14 Feb 2016 18:36:08 -0500 Subject: [PATCH] Version Update: 0.1.1 --- Core/EmulationSettings.cpp | 3 +- Core/EmulationSettings.h | 1 - Core/Movie.cpp | 43 ++++++++++----- Core/Movie.h | 1 + Core/SaveStateManager.cpp | 14 ++--- Core/SaveStateManager.h | 3 +- GUI.NET/Forms/frmAbout.Designer.cs | 66 ++++++++++++++++++++--- GUI.NET/Forms/frmAbout.cs | 5 ++ GUI.NET/Forms/frmUpdatePrompt.Designer.cs | 4 +- GUI.NET/Properties/AssemblyInfo.cs | 4 +- InteropDLL/InteropDLL.vcxproj | 10 ++++ InteropDLL/stdafx.h | 34 +++++------- TestHelper/TestHelper.cpp | 22 +------- TestHelper/TestHelper.vcxproj | 8 +++ 14 files changed, 142 insertions(+), 76 deletions(-) diff --git a/Core/EmulationSettings.cpp b/Core/EmulationSettings.cpp index 50f8f1ce..bbcb9d75 100644 --- a/Core/EmulationSettings.cpp +++ b/Core/EmulationSettings.cpp @@ -17,9 +17,10 @@ uint32_t EmulationSettings::PpuPaletteArgb[64] = { 0xFFB5EBF2, 0xFFB8B8B8, 0xFF000000, 0xFF000000, }; +//Version 0.1.1 uint16_t EmulationSettings::_versionMajor = 0; uint8_t EmulationSettings::_versionMinor = 1; -uint8_t EmulationSettings::_versionRevision = 0; +uint8_t EmulationSettings::_versionRevision = 1; uint32_t EmulationSettings::_flags = 0; diff --git a/Core/EmulationSettings.h b/Core/EmulationSettings.h index 87d63e0b..0ef47e5b 100644 --- a/Core/EmulationSettings.h +++ b/Core/EmulationSettings.h @@ -145,7 +145,6 @@ struct KeyMappingSet class EmulationSettings { private: - //Version 0.1.0 static uint16_t _versionMajor; static uint8_t _versionMinor; static uint8_t _versionRevision; diff --git a/Core/Movie.cpp b/Core/Movie.cpp index 6e8ebbba..b9e1eb62 100644 --- a/Core/Movie.cpp +++ b/Core/Movie.cpp @@ -5,6 +5,7 @@ #include "../Utilities/FolderUtilities.h" #include "RomLoader.h" #include "CheatManager.h" +#include "SaveStateManager.h" shared_ptr Movie::_instance(new Movie()); @@ -204,6 +205,7 @@ struct MovieHeader char Header[3] = { 'M', 'M', 'O' }; uint32_t MesenVersion; uint32_t MovieFormatVersion; + uint32_t SaveStateFormatVersion; uint32_t RomCrc32; uint32_t Region; uint32_t ConsoleType; @@ -220,7 +222,8 @@ bool Movie::Save() MovieHeader header = {}; header.MesenVersion = EmulationSettings::GetMesenVersion(); - header.MovieFormatVersion = 1; + header.MovieFormatVersion = Movie::MovieFormatVersion; + header.SaveStateFormatVersion = SaveStateManager::FileFormatVersion; header.RomCrc32 = RomLoader::GetCRC32(romFilepath); header.Region = (uint32_t)Console::GetNesModel(); header.ConsoleType = (uint32_t)EmulationSettings::GetConsoleType(); @@ -236,6 +239,7 @@ bool Movie::Save() _file.write((char*)header.Header, sizeof(header.Header)); _file.write((char*)&header.MesenVersion, sizeof(header.MesenVersion)); _file.write((char*)&header.MovieFormatVersion, sizeof(header.MovieFormatVersion)); + _file.write((char*)&header.SaveStateFormatVersion, sizeof(header.SaveStateFormatVersion)); _file.write((char*)&header.RomCrc32, sizeof(header.RomCrc32)); _file.write((char*)&header.Region, sizeof(header.Region)); _file.write((char*)&header.ConsoleType, sizeof(header.ConsoleType)); @@ -298,6 +302,12 @@ bool Movie::Load(std::stringstream &file, bool autoLoadRom) } file.read((char*)&header.MovieFormatVersion, sizeof(header.MovieFormatVersion)); + if(header.MovieFormatVersion != Movie::MovieFormatVersion) { + MessageManager::DisplayMessage("Movies", "This movie is incompatible with this version of Mesen."); + return false; + } + + file.read((char*)&header.SaveStateFormatVersion, sizeof(header.SaveStateFormatVersion)); file.read((char*)&header.RomCrc32, sizeof(header.RomCrc32)); file.read((char*)&header.Region, sizeof(header.Region)); file.read((char*)&header.ConsoleType, sizeof(header.ConsoleType)); @@ -316,6 +326,25 @@ bool Movie::Load(std::stringstream &file, bool autoLoadRom) memset(romFilename, 0, header.FilenameLength + 1); file.read((char*)romFilename, header.FilenameLength); + _cheatList.clear(); + CodeInfo cheatCode; + for(uint32_t i = 0; i < header.CheatCount; i++) { + file.read((char*)&cheatCode.Address, sizeof(cheatCode.Address)); + file.read((char*)&cheatCode.Value, sizeof(cheatCode.Value)); + file.read((char*)&cheatCode.CompareValue, sizeof(cheatCode.CompareValue)); + file.read((char*)&cheatCode.IsRelativeAddress, sizeof(cheatCode.IsRelativeAddress)); + _cheatList.push_back(cheatCode); + } + + file.read((char*)&_data.SaveStateSize, sizeof(uint32_t)); + + if(_data.SaveStateSize > 0) { + if(header.SaveStateFormatVersion != SaveStateManager::FileFormatVersion) { + MessageManager::DisplayMessage("Movies", "This movie is incompatible with this version of Mesen."); + return false; + } + } + bool loadedGame = true; if(autoLoadRom) { string currentRom = Console::GetROMPath(); @@ -328,18 +357,6 @@ bool Movie::Load(std::stringstream &file, bool autoLoadRom) } if(loadedGame) { - _cheatList.clear(); - CodeInfo cheatCode; - for(uint32_t i = 0; i < header.CheatCount; i++) { - file.read((char*)&cheatCode.Address, sizeof(cheatCode.Address)); - file.read((char*)&cheatCode.Value, sizeof(cheatCode.Value)); - file.read((char*)&cheatCode.CompareValue, sizeof(cheatCode.CompareValue)); - file.read((char*)&cheatCode.IsRelativeAddress, sizeof(cheatCode.IsRelativeAddress)); - _cheatList.push_back(cheatCode); - } - - file.read((char*)&_data.SaveStateSize, sizeof(uint32_t)); - if(_data.SaveStateSize > 0) { uint8_t *stateBuffer = new uint8_t[_data.SaveStateSize]; file.read((char*)stateBuffer, _data.SaveStateSize); diff --git a/Core/Movie.h b/Core/Movie.h index bc1d3e9b..74868e08 100644 --- a/Core/Movie.h +++ b/Core/Movie.h @@ -14,6 +14,7 @@ class Movie { private: static shared_ptr _instance; + const uint32_t MovieFormatVersion = 2; bool _recording = false; bool _playing = false; uint8_t _counter[4]; diff --git a/Core/SaveStateManager.cpp b/Core/SaveStateManager.cpp index f8f7f638..c0fe01b9 100644 --- a/Core/SaveStateManager.cpp +++ b/Core/SaveStateManager.cpp @@ -55,21 +55,21 @@ bool SaveStateManager::LoadState(int stateIndex) char header[3]; file.read(header, 3); if(memcmp(header, "MST", 3) == 0) { - Console::Pause(); - uint32_t emuVersion, fileFormatVersion; - file.read((char*)&emuVersion, sizeof(emuVersion)); + file.read((char*)&emuVersion, sizeof(emuVersion)); if(emuVersion > EmulationSettings::GetMesenVersion()) { - MessageManager::DisplayMessage("Save States", "Cannot load save states created by a more recent version of Mesen.Please download the latest version."); + MessageManager::DisplayMessage("Save States", "Cannot load save states created by a more recent version of Mesen. Please download the latest version."); + return false; } file.read((char*)&fileFormatVersion, sizeof(fileFormatVersion)); - - if(emuVersion != EmulationSettings::GetMesenVersion() || fileFormatVersion != SaveStateManager::FileFormatVersion) { - MessageManager::DisplayMessage("Save States", "State #" + std::to_string(stateIndex) + " does not match emulator version."); + if(fileFormatVersion != SaveStateManager::FileFormatVersion) { + MessageManager::DisplayMessage("Save States", "State #" + std::to_string(stateIndex) + " is incompatible with this version of Mesen."); + return false; } + Console::Pause(); Console::LoadState(file); Console::Resume(); diff --git a/Core/SaveStateManager.h b/Core/SaveStateManager.h index 3384f456..7233eb10 100644 --- a/Core/SaveStateManager.h +++ b/Core/SaveStateManager.h @@ -5,10 +5,11 @@ class SaveStateManager { private: - static const uint32_t FileFormatVersion = 1; static string GetStateFilepath(int stateIndex); public: + static const uint32_t FileFormatVersion = 2; + static uint64_t GetStateInfo(int stateIndex); static void SaveState(int stateIndex); static bool LoadState(int stateIndex); diff --git a/GUI.NET/Forms/frmAbout.Designer.cs b/GUI.NET/Forms/frmAbout.Designer.cs index e5f99c2f..b4ed44b4 100644 --- a/GUI.NET/Forms/frmAbout.Designer.cs +++ b/GUI.NET/Forms/frmAbout.Designer.cs @@ -35,9 +35,13 @@ this.lblLink = new System.Windows.Forms.Label(); this.labelVersion = new System.Windows.Forms.Label(); this.okButton = new System.Windows.Forms.Button(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.lblDonate = new System.Windows.Forms.Label(); + this.lnkDonate = new System.Windows.Forms.Label(); this.tableLayoutPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); this.flowLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel @@ -51,6 +55,7 @@ this.tableLayoutPanel.Controls.Add(this.flowLayoutPanel1, 1, 3); this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); + this.tableLayoutPanel.Controls.Add(this.flowLayoutPanel2, 0, 4); this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel.Location = new System.Drawing.Point(5, 5); this.tableLayoutPanel.Name = "tableLayoutPanel"; @@ -61,7 +66,7 @@ this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel.Size = new System.Drawing.Size(347, 99); + this.tableLayoutPanel.Size = new System.Drawing.Size(337, 102); this.tableLayoutPanel.TabIndex = 0; // // logoPictureBox @@ -70,7 +75,7 @@ this.logoPictureBox.Location = new System.Drawing.Point(3, 3); this.logoPictureBox.Name = "logoPictureBox"; this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 4); - this.logoPictureBox.Size = new System.Drawing.Size(64, 64); + this.logoPictureBox.Size = new System.Drawing.Size(64, 65); this.logoPictureBox.TabIndex = 12; this.logoPictureBox.TabStop = false; // @@ -81,7 +86,7 @@ this.labelProductName.Location = new System.Drawing.Point(76, 0); this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelProductName.Name = "labelProductName"; - this.labelProductName.Size = new System.Drawing.Size(268, 17); + this.labelProductName.Size = new System.Drawing.Size(258, 17); this.labelProductName.TabIndex = 19; this.labelProductName.Text = "Mesen"; this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -93,9 +98,9 @@ this.labelCopyright.Location = new System.Drawing.Point(76, 34); this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelCopyright.Name = "labelCopyright"; - this.labelCopyright.Size = new System.Drawing.Size(268, 17); + this.labelCopyright.Size = new System.Drawing.Size(258, 17); this.labelCopyright.TabIndex = 21; - this.labelCopyright.Text = "© 2016 M. Bibaud"; + this.labelCopyright.Text = "© 2016 M. Bibaud (aka Sour)"; this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // flowLayoutPanel1 @@ -140,26 +145,66 @@ this.labelVersion.Name = "labelVersion"; this.labelVersion.Size = new System.Drawing.Size(146, 17); this.labelVersion.TabIndex = 0; - this.labelVersion.Text = "Version: 0.1.0 (Beta)"; + this.labelVersion.Text = "Version: 0.1.1 (Beta)"; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // okButton // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.okButton.Location = new System.Drawing.Point(269, 73); + this.okButton.Location = new System.Drawing.Point(259, 76); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(75, 23); this.okButton.TabIndex = 24; this.okButton.Text = "&OK"; // + // flowLayoutPanel2 + // + this.tableLayoutPanel.SetColumnSpan(this.flowLayoutPanel2, 2); + this.flowLayoutPanel2.Controls.Add(this.lblDonate); + this.flowLayoutPanel2.Controls.Add(this.lnkDonate); + this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 81); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0, 10, 0, 0); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(337, 1); + this.flowLayoutPanel2.TabIndex = 27; + // + // lblDonate + // + this.lblDonate.AutoSize = true; + this.lblDonate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblDonate.Location = new System.Drawing.Point(6, 0); + this.lblDonate.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblDonate.Name = "lblDonate"; + this.lblDonate.Size = new System.Drawing.Size(330, 48); + this.lblDonate.TabIndex = 25; + this.lblDonate.Text = "Mesen is free. However, if you would like to show your support, click on the lin" + + "k below for more information on how you can donate. Thank you!"; + this.lblDonate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lblDonate.Visible = false; + // + // lnkDonate + // + this.lnkDonate.AutoSize = true; + this.lnkDonate.Cursor = System.Windows.Forms.Cursors.Hand; + this.lnkDonate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lnkDonate.ForeColor = System.Drawing.Color.Blue; + this.lnkDonate.Location = new System.Drawing.Point(20, 50); + this.lnkDonate.Margin = new System.Windows.Forms.Padding(20, 2, 3, 0); + this.lnkDonate.Name = "lnkDonate"; + this.lnkDonate.Size = new System.Drawing.Size(157, 13); + this.lnkDonate.TabIndex = 26; + this.lnkDonate.Text = "For more information, click here."; + this.lnkDonate.Visible = false; + this.lnkDonate.Click += new System.EventHandler(this.lnkDonate_Click); + // // frmAbout // this.AcceptButton = this.okButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.okButton; - this.ClientSize = new System.Drawing.Size(357, 109); + this.ClientSize = new System.Drawing.Size(347, 112); this.Controls.Add(this.tableLayoutPanel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; @@ -173,6 +218,8 @@ ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); this.ResumeLayout(false); } @@ -188,5 +235,8 @@ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Label lblWebsite; private System.Windows.Forms.Label lblLink; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.Label lblDonate; + private System.Windows.Forms.Label lnkDonate; } } diff --git a/GUI.NET/Forms/frmAbout.cs b/GUI.NET/Forms/frmAbout.cs index 8ef93aa8..23b431e9 100644 --- a/GUI.NET/Forms/frmAbout.cs +++ b/GUI.NET/Forms/frmAbout.cs @@ -20,5 +20,10 @@ namespace Mesen.GUI.Forms { System.Diagnostics.Process.Start("http://www.mesen.ca"); } + + private void lnkDonate_Click(object sender, EventArgs e) + { + System.Diagnostics.Process.Start("http://www.mesen.ca/index.php#Donate"); + } } } diff --git a/GUI.NET/Forms/frmUpdatePrompt.Designer.cs b/GUI.NET/Forms/frmUpdatePrompt.Designer.cs index 473e8742..f617e6db 100644 --- a/GUI.NET/Forms/frmUpdatePrompt.Designer.cs +++ b/GUI.NET/Forms/frmUpdatePrompt.Designer.cs @@ -75,7 +75,7 @@ this.lblLatestVersionString.Name = "lblLatestVersionString"; this.lblLatestVersionString.Size = new System.Drawing.Size(31, 13); this.lblLatestVersionString.TabIndex = 7; - this.lblLatestVersionString.Text = "0.1.1"; + this.lblLatestVersionString.Text = "x.x.x"; // // lblLatestVersion // @@ -127,7 +127,7 @@ this.lblCurrentVersionString.Name = "lblCurrentVersionString"; this.lblCurrentVersionString.Size = new System.Drawing.Size(31, 13); this.lblCurrentVersionString.TabIndex = 6; - this.lblCurrentVersionString.Text = "0.1.0"; + this.lblCurrentVersionString.Text = "x.x.x"; // // flowLayoutPanel1 // diff --git a/GUI.NET/Properties/AssemblyInfo.cs b/GUI.NET/Properties/AssemblyInfo.cs index b1f2a729..26e1addf 100644 --- a/GUI.NET/Properties/AssemblyInfo.cs +++ b/GUI.NET/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.0")] -[assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyVersion("0.1.1.0")] +[assembly: AssemblyFileVersion("0.1.1.0")] diff --git a/InteropDLL/InteropDLL.vcxproj b/InteropDLL/InteropDLL.vcxproj index 9461d057..4cb72114 100644 --- a/InteropDLL/InteropDLL.vcxproj +++ b/InteropDLL/InteropDLL.vcxproj @@ -225,6 +225,7 @@ Windows true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib + $(OutDir);%(AdditionalLibraryDirectories) @@ -241,6 +242,7 @@ Windows true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; + $(OutDir);%(AdditionalLibraryDirectories) @@ -260,6 +262,7 @@ true true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; + $(OutDir);%(AdditionalLibraryDirectories) @@ -280,6 +283,7 @@ true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; PGInstrument + $(OutDir);%(AdditionalLibraryDirectories) @@ -300,6 +304,7 @@ true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; PGOptimization + $(OutDir);%(AdditionalLibraryDirectories) @@ -319,6 +324,7 @@ true true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; + $(OutDir);%(AdditionalLibraryDirectories) @@ -339,6 +345,7 @@ true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; PGInstrument + $(OutDir);%(AdditionalLibraryDirectories) @@ -359,6 +366,7 @@ true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; PGOptimization + $(OutDir);%(AdditionalLibraryDirectories) @@ -378,6 +386,7 @@ true true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; + $(OutDir);%(AdditionalLibraryDirectories) @@ -397,6 +406,7 @@ true true Xinput9_1_0.lib;d3d11.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib; + $(OutDir);%(AdditionalLibraryDirectories) diff --git a/InteropDLL/stdafx.h b/InteropDLL/stdafx.h index e7255a96..64c4a047 100644 --- a/InteropDLL/stdafx.h +++ b/InteropDLL/stdafx.h @@ -23,27 +23,21 @@ #endif #endif -#ifdef ENVIRONMENT32 - #ifdef _DEBUG - #define MESEN_LIBRARY_PATH "../bin/x86/Debug/" - #define MESEN_LIBRARY_SUFFIX ".Debug.x86.lib" - #else - #define MESEN_LIBRARY_PATH "../bin/x86/Release/" - #define MESEN_LIBRARY_SUFFIX ".Release.x86.lib" - #endif -#else - #ifdef _DEBUG - #define MESEN_LIBRARY_PATH "../bin/x64/Debug/" - #define MESEN_LIBRARY_SUFFIX ".Debug.x64.lib" - #else - #define MESEN_LIBRARY_PATH "../bin/x64/Release/" - #define MESEN_LIBRARY_SUFFIX ".Release.x64.lib" - #endif +#ifdef _DEBUG + #define MESEN_LIBRARY_DEBUG_SUFFIX "Debug" +#else + #define MESEN_LIBRARY_DEBUG_SUFFIX "Release" #endif -#pragma comment(lib, MESEN_LIBRARY_PATH"Core.lib") -#pragma comment(lib, MESEN_LIBRARY_PATH"Utilities.lib") -#pragma comment(lib, MESEN_LIBRARY_PATH"Windows.lib") -#pragma comment(lib, "../Dependencies/DirectXTK" MESEN_LIBRARY_SUFFIX) +#ifdef ENVIRONMENT32 + #define MESEN_LIBRARY_SUFFIX "x86.lib" +#else + #define MESEN_LIBRARY_SUFFIX "x64.lib" +#endif + +#pragma comment(lib, "Core.lib") +#pragma comment(lib, "Utilities.lib") +#pragma comment(lib, "Windows.lib") +#pragma comment(lib, "../Dependencies/DirectXTK." MESEN_LIBRARY_DEBUG_SUFFIX "." MESEN_LIBRARY_SUFFIX) #define DllExport __declspec(dllexport) \ No newline at end of file diff --git a/TestHelper/TestHelper.cpp b/TestHelper/TestHelper.cpp index ac01db87..82d2e025 100644 --- a/TestHelper/TestHelper.cpp +++ b/TestHelper/TestHelper.cpp @@ -1,24 +1,4 @@ -#if _WIN64 || __x86_64__ || __ppc64__ - #define ENVIRONMENT64 -#else - #define ENVIRONMENT32 -#endif - -#ifdef ENVIRONMENT32 - #ifdef _DEBUG - #define MESEN_LIBRARY_PATH "../bin/x86/Debug/" - #else - #define MESEN_LIBRARY_PATH "../bin/x86/Release/" - #endif -#else - #ifdef _DEBUG - #define MESEN_LIBRARY_PATH "../bin/x64/Debug/" - #else - #define MESEN_LIBRARY_PATH "../bin/x64/Release/" - #endif -#endif - -#pragma comment(lib, MESEN_LIBRARY_PATH"Utilities.lib") +#pragma comment(lib, "Utilities.lib") #include #include diff --git a/TestHelper/TestHelper.vcxproj b/TestHelper/TestHelper.vcxproj index ab792ce6..80733665 100644 --- a/TestHelper/TestHelper.vcxproj +++ b/TestHelper/TestHelper.vcxproj @@ -175,6 +175,7 @@ Console true + $(OutDir);%(AdditionalLibraryDirectories) @@ -189,6 +190,7 @@ Console true + $(OutDir);%(AdditionalLibraryDirectories) @@ -207,6 +209,7 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories) @@ -225,6 +228,7 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories) @@ -243,6 +247,7 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories) @@ -261,6 +266,7 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories) @@ -279,6 +285,7 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories) @@ -297,6 +304,7 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories)