From d243063c2c7db4b3ac30ae7dd923904474afa75e Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 16 Jul 2016 22:21:22 +0000 Subject: [PATCH] add texture smoothing option to windows port --- desmume/src/windows/main.cpp | 4 ++++ desmume/src/windows/resource.h | 2 ++ desmume/src/windows/resources.rc | 1 + 3 files changed, 7 insertions(+) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 68c3fe179..aaabebd3a 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2971,6 +2971,7 @@ int _main() CommonSettings.GFX3D_Renderer_TextureScalingFactor = GetPrivateProfileInt("3D", "TextureScalingFactor ", 1, IniName); CommonSettings.GFX3D_Renderer_TextureDeposterize = GetPrivateProfileBool("3D", "TextureDeposterize ", 1, IniName); + CommonSettings.GFX3D_Renderer_TextureSmoothing = GetPrivateProfileBool("3D", "TextureSmooth ", 1, IniName); lostFocusPause = GetPrivateProfileBool("Focus", "BackgroundPause", false, IniName); @@ -6310,6 +6311,7 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) 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); + CheckDlgButton(hw,IDC_TEX_SMOOTH, CommonSettings.GFX3D_Renderer_TextureSmoothing); SendDlgItemMessage(hw, IDC_NUD_PRESCALEHD, UDM_SETRANGE, 0, MAKELPARAM(5, 1)); SendDlgItemMessage(hw, IDC_NUD_PRESCALEHD, UDM_SETPOS, 0, CommonSettings.GFX3D_PrescaleHD); @@ -6341,6 +6343,7 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) 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); + CommonSettings.GFX3D_Renderer_TextureSmoothing = IsDlgCheckboxChecked(hw,IDC_TEX_SMOOTH); { Lock lock(win_backbuffer_sync); @@ -6364,6 +6367,7 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) WritePrivateProfileInt ("3D", "PrescaleHD", CommonSettings.GFX3D_PrescaleHD, IniName); WritePrivateProfileInt ("3D", "TextureScalingFactor", CommonSettings.GFX3D_Renderer_TextureScalingFactor, IniName); WritePrivateProfileBool("3D", "TextureDeposterize", CommonSettings.GFX3D_Renderer_TextureDeposterize, IniName); + WritePrivateProfileBool("3D", "TextureSmooth", CommonSettings.GFX3D_Renderer_TextureSmoothing, IniName); } case IDCANCEL: { diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index 4499d751b..e28210c3f 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -464,6 +464,8 @@ #define IDC_STATIC_S4 1064 #define IDC_TEX_DEPOSTERIZE 1064 #define IDC_EVALUE 1065 +#define IDC_TEX_DEPOSTERIZE2 1065 +#define IDC_TEX_SMOOTH 1065 #define IDC_STATIC_RANGE 1066 #define IDC_TEXSCALE_1 1066 #define IDC_TEXSCALE_2 1067 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 14971c687..3a5c2f02c 100644 --- a/desmume/src/windows/resources.rc +++ b/desmume/src/windows/resources.rc @@ -143,6 +143,7 @@ BEGIN 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 + CONTROL "GL Tex Smoothing",IDC_TEX_SMOOTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,261,91,75,10 END IDD_ABOUT_BOX DIALOGEX 0, 0, 268, 198