Version Update: 0.1.1

This commit is contained in:
Souryo 2016-02-14 18:36:08 -05:00
parent a8e2d72a73
commit 71bf0527d9
14 changed files with 142 additions and 76 deletions

View file

@ -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;

View file

@ -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;

View file

@ -5,6 +5,7 @@
#include "../Utilities/FolderUtilities.h"
#include "RomLoader.h"
#include "CheatManager.h"
#include "SaveStateManager.h"
shared_ptr<Movie> 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);

View file

@ -14,6 +14,7 @@ class Movie
{
private:
static shared_ptr<Movie> _instance;
const uint32_t MovieFormatVersion = 2;
bool _recording = false;
bool _playing = false;
uint8_t _counter[4];

View file

@ -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();

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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");
}
}
}

View file

@ -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
//

View file

@ -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")]

View file

@ -225,6 +225,7 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>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</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -241,6 +242,7 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>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;</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -260,6 +262,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|Win32'">
@ -280,6 +283,7 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<LinkTimeCodeGeneration>PGInstrument</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|Win32'">
@ -300,6 +304,7 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<LinkTimeCodeGeneration>PGOptimization</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -319,6 +324,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
@ -339,6 +345,7 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<LinkTimeCodeGeneration>PGInstrument</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
@ -359,6 +366,7 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<LinkTimeCodeGeneration>PGOptimization</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
@ -378,6 +386,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
@ -397,6 +406,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>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;</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View file

@ -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
#ifdef _DEBUG
#define MESEN_LIBRARY_DEBUG_SUFFIX "Debug"
#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
#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)

View file

@ -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 <Windows.h>
#include <Shlobj.h>

View file

@ -175,6 +175,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -189,6 +190,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -207,6 +209,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|Win32'">
@ -225,6 +228,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|Win32'">
@ -243,6 +247,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -261,6 +266,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
@ -279,6 +285,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
@ -297,6 +304,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>