From e0f8e5a82ab6d175c990b4f5fd810f4b0464c703 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 16 Mar 2016 06:47:46 +0000 Subject: [PATCH] vs2010 - add fastbuild configuration, hookup texture upscaling options --- desmume/src/windows/DeSmuME_2010.sln | 6 + desmume/src/windows/DeSmuME_2010.vcxproj | 156 ++++++++++++++++++ .../src/windows/DeSmuME_2010.vcxproj.filters | 11 ++ desmume/src/windows/main.cpp | 15 +- desmume/src/windows/resource.h | 6 +- desmume/src/windows/resources.rc | 6 +- 6 files changed, 197 insertions(+), 3 deletions(-) diff --git a/desmume/src/windows/DeSmuME_2010.sln b/desmume/src/windows/DeSmuME_2010.sln index c1476eb9b..6ce52a37e 100644 --- a/desmume/src/windows/DeSmuME_2010.sln +++ b/desmume/src/windows/DeSmuME_2010.sln @@ -9,6 +9,8 @@ Global Debug|x64 = Debug|x64 Dev+|Win32 = Dev+|Win32 Dev+|x64 = Dev+|x64 + Release Fastbuild|Win32 = Release Fastbuild|Win32 + Release Fastbuild|x64 = Release Fastbuild|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection @@ -21,6 +23,10 @@ Global {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|Win32.Build.0 = Dev+|Win32 {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|x64.ActiveCfg = Dev+|x64 {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Dev+|x64.Build.0 = Dev+|x64 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release Fastbuild|Win32.ActiveCfg = Release Fastbuild|Win32 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release Fastbuild|Win32.Build.0 = Release Fastbuild|Win32 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release Fastbuild|x64.ActiveCfg = Release Fastbuild|x64 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release Fastbuild|x64.Build.0 = Release Fastbuild|x64 {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|Win32.ActiveCfg = Release|Win32 {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|Win32.Build.0 = Release|Win32 {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|x64.ActiveCfg = Release|x64 diff --git a/desmume/src/windows/DeSmuME_2010.vcxproj b/desmume/src/windows/DeSmuME_2010.vcxproj index 6f79d0b95..ebe0e14c7 100644 --- a/desmume/src/windows/DeSmuME_2010.vcxproj +++ b/desmume/src/windows/DeSmuME_2010.vcxproj @@ -17,6 +17,14 @@ Dev+ x64 + + Release Fastbuild + Win32 + + + Release Fastbuild + x64 + Release Win32 @@ -38,6 +46,9 @@ true + + false + false @@ -45,6 +56,9 @@ true + + true + @@ -58,6 +72,10 @@ + + + + @@ -70,6 +88,10 @@ + + + + @@ -80,13 +102,17 @@ $(SolutionDir)\__bins\ $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ $(SolutionDir)\__bins\ + $(SolutionDir)\__bins\ $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ + $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ $(SolutionDir)\__bins\ $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ $(SolutionDir)\__bins\ $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ $(SolutionDir)\__bins\ + $(SolutionDir)\__bins\ $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ + $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ $(SolutionDir)\__bins\ $(SolutionDir)\.VS2010\$(Configuration)\$(Platform)\ AllRules.ruleset @@ -102,15 +128,23 @@ AllRules.ruleset + AllRules.ruleset + + AllRules.ruleset + AllRules.ruleset + + $(ProjectName)_x64_release + $(ProjectName)_x64_release $(ProjectName)_x64_debug $(ProjectName)_x64_dev+ $(ProjectName)_release + $(ProjectName)_release $(ProjectName)_debug $(ProjectName)_dev+ @@ -192,6 +226,46 @@ DeSmuME_x86.manifest;%(AdditionalManifestFiles) + + + defaultconfig\SubWCRev.bat + + + MaxSpeed + AnySuitable + true + Speed + true + true + false + .;..;lua\include;glib-2.20.1\build;glib-2.20.1\build\glib;.\zlib128;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx;File_Extractor;%(AdditionalIncludeDirectories) + FASTBUILD;_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + Default + false + StreamingSIMDExtensions2 + Fast + ProgramDatabase + Cdecl + Default + true + + + directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib;lua51.lib;glib-vc8-Win32.lib;zlib-vc8-Win32.lib;agg-2.5.lib;vfw32.lib;winmm.lib;opengl32.lib;glu32.lib;ws2_32.lib;user32.lib;gdi32.lib;shell32.lib;comdlg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)_release.exe + .\zlib128;agg;.libs;.libs\win32 + lua51.dll + true + true + false + + + + + DeSmuME_x86.manifest;%(AdditionalManifestFiles) + + defaultconfig\SubWCRev.bat @@ -321,6 +395,51 @@ DeSmuME_x64.manifest;%(AdditionalManifestFiles) + + + defaultconfig\SubWCRev.bat + + + X64 + + + MaxSpeed + AnySuitable + true + Speed + true + true + true + .;..;lua\include;glib-2.20.1\build;glib-2.20.1\build\glib;.\zlib128;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx;File_Extractor;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + Default + false + StreamingSIMDExtensions2 + Fast + Level1 + ProgramDatabase + Cdecl + Default + true + + + directx-x64-ddraw-dinput8-dsound-dxerr8-dxguid.lib;lua51.lib;glib-vc8-x64.lib;zlib-vc8-x64.lib;agg-2.5-x64.lib;vfw32.lib;winmm.lib;opengl32.lib;glu32.lib;ws2_32.lib;user32.lib;gdi32.lib;shell32.lib;comdlg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)_x64_release.exe + .\zlib128;agg;.libs;.libs\x64 + lua51.dll + true + true + false + + + MachineX64 + + + DeSmuME_x64.manifest;%(AdditionalManifestFiles) + + defaultconfig\SubWCRev.bat @@ -392,7 +511,9 @@ Cdecl Cdecl + Cdecl Cdecl + Cdecl @@ -504,7 +625,9 @@ $(IntDir)\decrypt\ $(IntDir)\decrypt\ $(IntDir)\decrypt\ + $(IntDir)\decrypt\ $(IntDir)\decrypt\ + $(IntDir)\decrypt\ @@ -895,6 +1018,17 @@ + + + + + + + + + + + call un7z_and_touch.bat directx\directx.7z .libs\directx* @@ -910,13 +1044,21 @@ 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) .libs\directx.tag;%(Outputs) call un7z_and_touch.bat directx\directx.7z .libs\directx* + + call un7z_and_touch.bat directx\directx.7z .libs\directx* 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) + 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) .libs\directx.tag;%(Outputs) + .libs\directx.tag;%(Outputs) call un7z_and_touch.bat directx\directx.7z .libs\directx* + + call un7z_and_touch.bat directx\directx.7z .libs\directx* 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) + 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) .libs\directx.tag;%(Outputs) + .libs\directx.tag;%(Outputs) call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib* @@ -932,13 +1074,21 @@ 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) .libs\glib-vc8.tag;%(Outputs) call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib* + + call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib* 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) + 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) .libs\glib-vc8.tag;%(Outputs) + .libs\glib-vc8.tag;%(Outputs) call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib* + + call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib* 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) + 7z.exe;un7z_and_touch.bat;%(AdditionalInputs) .libs\glib-vc8.tag;%(Outputs) + .libs\glib-vc8.tag;%(Outputs) call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag @@ -951,11 +1101,17 @@ 7z.exe;un7z_and_touch.bat .libs\lua.tag; call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag + call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag 7z.exe;un7z_and_touch.bat + 7z.exe;un7z_and_touch.bat .libs\lua.tag; + .libs\lua.tag; call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag + call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag 7z.exe;un7z_and_touch.bat + 7z.exe;un7z_and_touch.bat .libs\lua.tag; + .libs\lua.tag; call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag .libs\lua.tag; 7z.exe;un7z_and_touch.bat diff --git a/desmume/src/windows/DeSmuME_2010.vcxproj.filters b/desmume/src/windows/DeSmuME_2010.vcxproj.filters index ca252ed5b..db60ffc7f 100644 --- a/desmume/src/windows/DeSmuME_2010.vcxproj.filters +++ b/desmume/src/windows/DeSmuME_2010.vcxproj.filters @@ -1642,6 +1642,17 @@ Windows\File_Extractor\unrar + + + + + + + + + + + diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index ebe7eddd1..7a0adfa44 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2971,6 +2971,9 @@ int _main() CommonSettings.GFX3D_PrescaleHD = GetPrivateProfileInt("3D", "PrescaleHD", 1, IniName); video.SetPrescale(CommonSettings.GFX3D_PrescaleHD, 1); + + CommonSettings.GFX3D_Renderer_TextureScalingFactor = GetPrivateProfileInt("3D", "TextureScalingFactor ", 1, IniName); + CommonSettings.GFX3D_Renderer_TextureDeposterize = GetPrivateProfileBool("3D", "TextureDeposterize ", 1, IniName); lostFocusPause = GetPrivateProfileBool("Focus", "BackgroundPause", false, IniName); @@ -6278,7 +6281,11 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) CheckDlgButton(hw,IDC_3DSETTINGS_ANTIALIASING, CommonSettings.GFX3D_Renderer_Multisample); CheckDlgButton(hw,IDC_TXTHACK, CommonSettings.GFX3D_TXTHack); SetDlgItemInt (hw,IDC_ZELDA_SHADOW_DEPTH_HACK,CommonSettings.GFX3D_Zelda_Shadow_Depth_Hack,FALSE); - //CheckDlgButton(hw,IDC_ALTERNATEFLUSH,CommonSettings.gfx3d_flushMode); + + if(CommonSettings.GFX3D_Renderer_TextureScalingFactor == 1) CheckDlgButton(hw,IDC_TEXSCALE_1,CommonSettings.GFX3D_Texture); + if(CommonSettings.GFX3D_Renderer_TextureScalingFactor == 2) CheckDlgButton(hw,IDC_TEXSCALE_2,CommonSettings.GFX3D_Texture); + if(CommonSettings.GFX3D_Renderer_TextureScalingFactor == 4) CheckDlgButton(hw,IDC_TEXSCALE_4,CommonSettings.GFX3D_Texture); + CheckDlgButton(hw,IDC_TEX_DEPOSTERIZE, CommonSettings.GFX3D_Renderer_TextureDeposterize); SendDlgItemMessage(hw, IDC_NUD_PRESCALEHD, UDM_SETRANGE, 0, MAKELPARAM(5, 1)); SendDlgItemMessage(hw, IDC_NUD_PRESCALEHD, UDM_SETPOS, 0, CommonSettings.GFX3D_PrescaleHD); @@ -6306,6 +6313,10 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) CommonSettings.GFX3D_Zelda_Shadow_Depth_Hack = GetDlgItemInt(hw,IDC_ZELDA_SHADOW_DEPTH_HACK,NULL,FALSE); CommonSettings.GFX3D_TXTHack = IsDlgCheckboxChecked(hw,IDC_TXTHACK); CommonSettings.GFX3D_PrescaleHD = SendDlgItemMessage(hw, IDC_NUD_PRESCALEHD, UDM_GETPOS, 0, 0); + if(IsDlgCheckboxChecked(hw,IDC_TEXSCALE_1)) CommonSettings.GFX3D_Renderer_TextureScalingFactor = 1; + if(IsDlgCheckboxChecked(hw,IDC_TEXSCALE_2)) CommonSettings.GFX3D_Renderer_TextureScalingFactor = 2; + if(IsDlgCheckboxChecked(hw,IDC_TEXSCALE_4)) CommonSettings.GFX3D_Renderer_TextureScalingFactor = 4; + CommonSettings.GFX3D_Renderer_TextureDeposterize = IsDlgCheckboxChecked(hw,IDC_TEX_DEPOSTERIZE); { Lock lock(win_backbuffer_sync); @@ -6327,6 +6338,8 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) WritePrivateProfileInt ("3D", "EnableAntiAliasing", CommonSettings.GFX3D_Renderer_Multisample, IniName); WritePrivateProfileInt ("3D", "EnableTXTHack", CommonSettings.GFX3D_TXTHack, IniName); WritePrivateProfileInt ("3D", "PrescaleHD", CommonSettings.GFX3D_PrescaleHD, IniName); + WritePrivateProfileInt ("3D", "TextureScalingFactor", CommonSettings.GFX3D_Renderer_TextureScalingFactor, IniName); + WritePrivateProfileBool("3D", "TextureDeposterize", CommonSettings.GFX3D_Renderer_TextureDeposterize, IniName); } case IDCANCEL: { diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index 6e2492918..6f12e6ab5 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -462,10 +462,14 @@ #define IDC_TEXT_PRESCALEHD 1062 #define IDC_STATIC_S3 1063 #define IDC_STATIC_S4 1064 +#define IDC_TEX_DEPOSTERIZE 1064 #define IDC_EVALUE 1065 #define IDC_STATIC_RANGE 1066 +#define IDC_TEXSCALE_1 1066 +#define IDC_TEXSCALE_2 1067 #define IDC_BADD 1068 #define IDC_LIST 1069 +#define IDC_TEXSCALE_4 1070 #define IDC_SNUMBER 1071 #define IDC_CHECK1 1074 #define IDC_CHECK2 1075 @@ -1061,7 +1065,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 128 #define _APS_NEXT_COMMAND_VALUE 40126 -#define _APS_NEXT_CONTROL_VALUE 1063 +#define _APS_NEXT_CONTROL_VALUE 1065 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 98575eca7..19d3b9422 100644 --- a/desmume/src/windows/resources.rc +++ b/desmume/src/windows/resources.rc @@ -137,8 +137,12 @@ BEGIN LTEXT "Fixes text bugs in some games.(e.g. Etrian Odyssey)",ID_LABEL_TXTHACK1,15,151,165,11 CONTROL "Enable TXT Hack",IDC_TXTHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,138,73,10 GROUPBOX "OpenGL Renderer Options",IDC_STATIC,7,166,176,33 - GROUPBOX "General Options",IDC_STATIC,189,6,176,114 + GROUPBOX "General Options",IDC_STATIC,189,6,176,146 LTEXT "HD Prescaling:",IDC_STATIC,195,64,48,8 + CONTROL "GL TexScale 1x",IDC_TEXSCALE_1,"Button",BS_AUTORADIOBUTTON,193,80,67,10 + CONTROL "GL TexScale 2x",IDC_TEXSCALE_2,"Button",BS_AUTORADIOBUTTON,193,90,67,10 + CONTROL "GL TexScale 4x",IDC_TEXSCALE_4,"Button",BS_AUTORADIOBUTTON,193,100,67,10 + CONTROL "GL Tex Deposterize",IDC_TEX_DEPOSTERIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,261,81,79,10 END IDD_ABOUT_BOX DIALOGEX 0, 0, 268, 198