I apologize my mistake. Commit changes I deleted by mistake.

This commit is contained in:
zones 2011-01-30 21:32:06 +09:00
parent fb2f4b0f12
commit 78d2b51efe
11 changed files with 100 additions and 64 deletions

View File

@ -79,6 +79,6 @@ public:
#define fopen _tfwopen
#define remove _twremove
#endif
#endif // _TFWOPEN_H
#endif

View File

@ -549,6 +549,34 @@ inline void SetRect(RECT* rect, int width, int height, int scale)
rect->bottom = (height - (GUI.HeightExtend?0:15)) * scale;
}
#define AVERAGE_565(el0, el1) (((el0) & (el1)) + ((((el0) ^ (el1)) & 0xF7DE) >> 1))
void RenderMergeHires(void *buffer, int pitch, unsigned int &width, unsigned int &height)
{
if (width <= 256)
return;
for (register int y = 0; y < height; y++)
{
register uint16 *input = (uint16 *) ((uint8 *) buffer + y * pitch);
register uint16 *output = input;
register uint16 l, r;
l = 0;
for (register int x = 0; x < (width >> 1); x++)
{
r = *input++;
*output++ = AVERAGE_565 (l, r);
l = r;
r = *input++;
*output++ = AVERAGE_565 (l, r);
l = r;
}
}
return;
}
// No enlargement, just render to the screen
void RenderPlain (SSurface Src, SSurface Dst, RECT *rect)
@ -600,14 +628,14 @@ void RenderForced1X( SSurface Src, SSurface Dst, RECT *rect)
memcpy (lpDst, lpSrc, Src.Width << 1);
else
for (H = 0; H < srcHeight; H++, lpDst += dstPitch, lpSrc += srcPitch)
HalfLine16 (lpDst, lpSrc, Src.Width);
HalfLine16 (lpDst, lpSrc, Src.Width >> 1);
else
if(Src.Width != 512)
for (H = 0; H != Src.Height; H+=2, lpDst += dstPitch, lpSrc += srcPitch<<1)
memcpy (lpDst, lpSrc, Src.Width << 1);
else
for (H = 0; H < Src.Height >> 1; H++, lpDst += dstPitch, lpSrc += srcPitch<<1)
HalfLine16 (lpDst, lpSrc, Src.Width);
HalfLine16 (lpDst, lpSrc, Src.Width >> 1);
}
else if(GUI.ScreenDepth == 32)
{
@ -619,14 +647,14 @@ void RenderForced1X( SSurface Src, SSurface Dst, RECT *rect)
SingleLine32 (lpDst, lpSrc, Src.Width);
else
for (H = 0; H < srcHeight; H++, lpDst += dstPitch, lpSrc += srcPitch)
HalfLine32 (lpDst, lpSrc, Src.Width);
HalfLine32 (lpDst, lpSrc, Src.Width >> 1);
else
if(Src.Width != 512)
for (H = 0; H != Src.Height; H+=2, lpDst += dstPitch, lpSrc += srcPitch<<1)
SingleLine32 (lpDst, lpSrc, Src.Width);
else
for (H = 0; H < Src.Height >> 1; H++, lpDst += dstPitch, lpSrc += srcPitch<<1)
HalfLine32 (lpDst, lpSrc, Src.Width);
HalfLine32 (lpDst, lpSrc, Src.Width >> 1);
}
}

View File

@ -195,6 +195,7 @@ typedef void (*TRenderMethod)( SSurface Src, SSurface Dst, RECT *);
void SelectRenderMethod();
void InitLUTsWin32();
void RenderMergeHires(void *buffer, int pitch, unsigned int &width, unsigned int &height);
extern TRenderMethod RenderMethod;
extern TRenderMethod RenderMethodHiRes;

View File

@ -129,6 +129,8 @@
#define IDC_TRANS 1113
#define IDC_HIRES 1114
#define IDC_CHEAT_CODE 1115
#define IDC_HIRES2 1115
#define IDC_HIRESBLEND 1115
#define IDC_FILTERBOX 1116
#define IDC_FILTERBOX2 1117
#define IDC_AUTOFRAME 1118

View File

@ -173,13 +173,13 @@ BEGIN
CONTROL "Sync By Reset",IDC_SYNCBYRESET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,90,174,15
END
IDD_NEWDISPLAY DIALOGEX 0, 0, 353, 259
IDD_NEWDISPLAY DIALOGEX 0, 0, 353, 274
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION
CAPTION "Display Settings"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,239,237,50,14
PUSHBUTTON "Cancel",IDCANCEL,296,237,50,14
DEFPUSHBUTTON "OK",IDOK,239,251,50,14
PUSHBUTTON "Cancel",IDCANCEL,296,251,50,14
COMBOBOX IDC_OUTPUTMETHOD,68,17,101,58,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Fullscreen",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,36,48,10
CONTROL "Emulate Fullscreen",IDC_EMUFULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,47,75,10
@ -188,40 +188,41 @@ BEGIN
COMBOBOX IDC_ASPECTDROP,104,67,63,41,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Bilinear Filtering",IDC_BILINEAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,80,75,8
CONTROL "Show Frame Rate",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,91,73,8
CONTROL "Automatic",IDC_AUTOFRAME,"Button",BS_AUTORADIOBUTTON,11,126,43,8
CONTROL "Fixed",IDC_FIXEDSKIP,"Button",BS_AUTORADIOBUTTON,11,143,43,10
EDITTEXT IDC_MAXSKIP,133,125,35,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN_MAX_SKIP_DISP,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,169,127,11,13
EDITTEXT IDC_SKIPCOUNT,133,142,35,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN_MAX_SKIP_DISP_FIXED,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,169,139,11,13
CONTROL "Automatic",IDC_AUTOFRAME,"Button",BS_AUTORADIOBUTTON,11,140,43,8
CONTROL "Fixed",IDC_FIXEDSKIP,"Button",BS_AUTORADIOBUTTON,11,157,43,10
EDITTEXT IDC_MAXSKIP,133,139,35,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN_MAX_SKIP_DISP,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,169,141,11,13
EDITTEXT IDC_SKIPCOUNT,133,156,35,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN_MAX_SKIP_DISP_FIXED,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,169,153,11,13
COMBOBOX IDC_FILTERBOX,186,17,153,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_FILTERBOX2,217,33,122,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Resolution",IDC_CURRMODE,187,71,41,8
COMBOBOX IDC_RESOLUTION,234,69,105,95,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable Triple Buffering",IDC_DBLBUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,86,87,10
CONTROL "VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,300,86,37,10
CONTROL "Transparency Effects",IDC_TRANS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,113,153,10
CONTROL "Hi Resolution Support",IDC_HIRES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,124,85,10
CONTROL "Extend Height of SNES Image",IDC_HEIGHT_EXTEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,135,111,10
CONTROL "Extend Height of SNES Image",IDC_HEIGHT_EXTEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,147,111,10
CONTROL "Display messages before applying filters",IDC_MESSAGES_IN_IMAGE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,146,140,10
GROUPBOX "",IDC_SHADER_GROUP,8,162,338,71,0,WS_EX_TRANSPARENT
EDITTEXT IDC_SHADER_HLSL_FILE,13,184,306,14,ES_AUTOHSCROLL | WS_DISABLED
PUSHBUTTON "...",IDC_SHADER_HLSL_BROWSE,322,184,19,14,WS_DISABLED
GROUPBOX "Frame Skipping:",IDC_STATIC,7,113,167,46,0,WS_EX_TRANSPARENT
GROUPBOX "SNES Image",IDC_STATIC,180,103,166,57,0,WS_EX_TRANSPARENT
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,158,140,10
GROUPBOX "",IDC_SHADER_GROUP,8,176,338,71,0,WS_EX_TRANSPARENT
EDITTEXT IDC_SHADER_HLSL_FILE,13,198,306,14,ES_AUTOHSCROLL | WS_DISABLED
PUSHBUTTON "...",IDC_SHADER_HLSL_BROWSE,322,198,19,14,WS_DISABLED
GROUPBOX "Frame Skipping:",IDC_STATIC,7,127,167,46,0,WS_EX_TRANSPARENT
GROUPBOX "SNES Image",IDC_STATIC,180,103,166,71,0,WS_EX_TRANSPARENT
GROUPBOX "Output Image Processing",IDC_STATIC,179,7,166,46,0,WS_EX_TRANSPARENT
GROUPBOX "Fullscreen Display Settings",IDC_STATIC,179,56,166,44,0,WS_EX_TRANSPARENT
LTEXT "Hi Res:",IDC_HIRESLABEL,186,36,31,8
GROUPBOX "General",IDC_STATIC,7,7,167,99,0,WS_EX_TRANSPARENT
LTEXT "Max skipped frames:",IDC_STATIC,62,126,67,8
LTEXT "Amount skipped:",IDC_STATIC,62,144,67,8
GROUPBOX "General",IDC_STATIC,7,7,167,113,0,WS_EX_TRANSPARENT
LTEXT "Max skipped frames:",IDC_STATIC,62,140,67,8
LTEXT "Amount skipped:",IDC_STATIC,62,158,67,8
LTEXT "Output Method",IDC_STATIC,10,19,51,11
CONTROL "Use Shader",IDC_SHADER_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,162,52,9
LTEXT "HLSL Effect File",IDC_STATIC,13,173,104,8
EDITTEXT IDC_SHADER_GLSL_FILE,13,213,306,14,ES_AUTOHSCROLL | WS_DISABLED
PUSHBUTTON "...",IDC_SHADER_GLSL_BROWSE,322,213,19,14,WS_DISABLED
LTEXT "GLSL shader",IDC_STATIC,13,202,104,8
CONTROL "Use Shader",IDC_SHADER_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,176,52,9
LTEXT "HLSL Effect File",IDC_STATIC,13,187,104,8
EDITTEXT IDC_SHADER_GLSL_FILE,13,227,306,14,ES_AUTOHSCROLL | WS_DISABLED
PUSHBUTTON "...",IDC_SHADER_GLSL_BROWSE,322,227,19,14,WS_DISABLED
LTEXT "GLSL shader",IDC_STATIC,13,216,104,8
CONTROL "Blend Hi-Res Images",IDC_HIRESBLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,136,82,10
CONTROL "VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,102,37,10
END
IDD_CHEATER DIALOGEX 0, 0, 262, 218
@ -603,7 +604,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 346
TOPMARGIN, 7
BOTTOMMARGIN, 251
BOTTOMMARGIN, 266
END
IDD_CHEATER, DIALOG

View File

@ -57,7 +57,7 @@
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x"
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT"
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT"
StringPooling="true"
RuntimeLibrary="0"
StructMemberAlignment="0"
@ -159,7 +159,7 @@
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x"
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT"
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT"
StringPooling="true"
RuntimeLibrary="0"
StructMemberAlignment="0"
@ -355,7 +355,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x"
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;FMODEX_SUPPORT;D3D_DEBUG_INFO"
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;FMODEX_SUPPORT;D3D_DEBUG_INFO"
RuntimeLibrary="1"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
@ -454,7 +454,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\..\&quot;;&quot;$(ProjectDir)..\..\zLib&quot;;&quot;$(ProjectDir)..\unzip&quot;;&quot;$(ProjectDir)..\..\FMOD\api\inc&quot;;&quot;$(ProjectDir)..\..\libPNG\src&quot;;&quot;$(ProjectDir)..\snes9x&quot;"
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;FMODEX_SUPPORT;D3D_DEBUG_INFO"
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;FMODEX_SUPPORT;D3D_DEBUG_INFO"
RuntimeLibrary="1"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
@ -554,7 +554,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\..\&quot;;&quot;$(ProjectDir)..\..\zLib&quot;;&quot;$(ProjectDir)..\unzip&quot;;&quot;$(ProjectDir)..\..\FMOD\api\inc&quot;;&quot;$(ProjectDir)..\..\libPNG\src&quot;;&quot;$(ProjectDir)..\snes9x&quot;"
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;CPU_SHUTDOWN;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;FMODEX_SUPPORT;D3D_DEBUG_INFO"
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;ZLIB;UNZIP_SUPPORT;__WIN32__;NETPLAY_SUPPORT;FMODEX_SUPPORT;D3D_DEBUG_INFO;DEBUGGER"
RuntimeLibrary="1"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
@ -597,7 +597,7 @@
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
Profile="true"
Profile="false"
/>
<Tool
Name="VCALinkTool"
@ -661,7 +661,7 @@
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x"
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;CORRECT_VRAM_READS;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT"
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT"
StringPooling="true"
RuntimeLibrary="0"
StructMemberAlignment="0"
@ -807,7 +807,7 @@
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
Profile="true"
Profile="false"
/>
<Tool
Name="VCALinkTool"

View File

@ -863,6 +863,7 @@ void WinRegisterConfigItems()
AddUIntC("OutputMethod", GUI.outputMethod, 1, "0=DirectDraw, 1=Direct3D");
AddUIntC("FilterType", GUI.Scale, 0, filterString);
AddUIntC("FilterHiRes", GUI.ScaleHiRes, 0, filterString2);
AddBoolC("BlendHiRes", GUI.BlendHiRes, true, "true to horizontally blend Hi-Res images (better transparency effect on filters that do not account for this)");
AddBoolC("ShaderEnabled", GUI.shaderEnabled, false, "true to use pixel shader (if supported by output method)");
AddStringC("Direct3D:HLSLFileName", GUI.HLSLshaderFileName, MAX_PATH, "", "shader filename for Direct3D mode");
AddStringC("OpenGL:GLSLFileName", GUI.GLSLshaderFileName, MAX_PATH, "", "shader filename for OpenGL mode (bsnes-style XML shader)");

View File

@ -1236,7 +1236,7 @@ void DoAVIClose(int reason)
}
}
void DoAVIVideoFrame(SSurface* source_surface, int Width, int Height/*, bool8 sixteen_bit*/)
void DoAVIVideoFrame(SSurface* source_surface)
{
static uint32 lastFrameCount=0;
if(!GUI.AVIOut || !avi_buffer || (IPPU.FrameCount==lastFrameCount))

View File

@ -196,6 +196,7 @@
CDirect3D Direct3D;
CDirectDraw DirectDraw;
COpenGL OpenGL;
SSurface Src = {0};
// Interface used to access the display output
IS9xDisplayOutput *S9xDisplayOutput=&Direct3D;
@ -208,14 +209,18 @@ IS9xDisplayOutput *S9xDisplayOutput=&Direct3D;
#endif
bool8 S9xDeinitUpdate (int, int);
void DoAVIVideoFrame(SSurface* source_surface, int width, int height);
void DoAVIVideoFrame(SSurface* source_surface);
/* WinRefreshDisplay
repeats the last rendered frame
*/
void WinRefreshDisplay(void)
{
S9xDeinitUpdate(IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight);
SelectRenderMethod ();
if(Src.Surface!=NULL) {
S9xDisplayOutput->Render(Src);
GUI.FlipCounter++;
}
}
void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight)
@ -330,8 +335,6 @@ bool8 S9xContinueUpdate(int Width, int Height)
{
// called every other frame during interlace
SSurface Src;
Src.Width = Width;
if(Height%SNES_HEIGHT)
Src.Height = Height;
@ -344,10 +347,8 @@ bool8 S9xContinueUpdate(int Width, int Height)
Src.Pitch = GFX.Pitch;
Src.Surface = (BYTE*)GFX.Screen;
Height = Src.Height;
// avi writing
DoAVIVideoFrame(&Src, Width, Height);
DoAVIVideoFrame(&Src);
return true;
}
@ -355,8 +356,6 @@ bool8 S9xContinueUpdate(int Width, int Height)
// do the actual rendering of a frame
bool8 S9xDeinitUpdate (int Width, int Height)
{
SSurface Src;
Src.Width = Width;
if(Height%SNES_HEIGHT)
Src.Height = Height;
@ -372,10 +371,12 @@ bool8 S9xDeinitUpdate (int Width, int Height)
const int OrigHeight = Height;
Height = Src.Height;
// avi writing
DoAVIVideoFrame(&Src, Width, Height);
if(GUI.BlendHiRes) {
RenderMergeHires(Src.Surface,Src.Pitch,Src.Width,Src.Height);
}
SelectRenderMethod ();
// avi writing
DoAVIVideoFrame(&Src);
// Clear some of the old SNES rendered image
// when the resolution becomes lower in x or y,
@ -406,9 +407,7 @@ bool8 S9xDeinitUpdate (int Width, int Height)
LastHeight = OrigHeight;
}
S9xDisplayOutput->Render(Src);
GUI.FlipCounter++;
WinRefreshDisplay();
return (true);
}

View File

@ -6958,7 +6958,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
// temporary GUI state for restoring after previewing while selecting options
static int prevScale, prevScaleHiRes, prevPPL;
static bool prevStretch, prevAspectRatio, prevHeightExtend, prevAutoDisplayMessages, prevVideoMemory, prevShaderEnabled;
static bool prevStretch, prevAspectRatio, prevHeightExtend, prevAutoDisplayMessages, prevBilinearFilter, prevShaderEnabled;
static int prevAspectWidth;
static OutputMethod prevOutputMethod;
static TCHAR prevHLSLShaderFile[MAX_PATH],prevGLSLShaderFile[MAX_PATH];
@ -6983,7 +6983,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
prevScaleHiRes = GUI.ScaleHiRes;
prevPPL = GFX.RealPPL;
prevStretch = GUI.Stretch;
prevVideoMemory = GUI.BilinearFilter;
prevBilinearFilter = GUI.BilinearFilter;
prevAspectRatio = GUI.AspectRatio;
prevAspectWidth = GUI.AspectWidth;
prevHeightExtend = GUI.HeightExtend;
@ -7009,6 +7009,8 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
if(Settings.SupportHiRes)
SendDlgItemMessage(hDlg, IDC_HIRES, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
if(GUI.BlendHiRes)
SendDlgItemMessage(hDlg, IDC_HIRESBLEND, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
if(GUI.HeightExtend)
SendDlgItemMessage(hDlg, IDC_HEIGHT_EXTEND, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
if(Settings.AutoDisplayMessages)
@ -7098,7 +7100,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
// have to start focus on something like this or Escape won't exit the dialog
SetFocus(hDlg);
goto checkUpdateFilterBox2;
SendDlgItemMessage(hDlg,IDC_FILTERBOX2,CB_SETCURSEL,(WPARAM)GUI.ScaleHiRes,0);
break;
case WM_CLOSE:
@ -7330,7 +7332,7 @@ updateFilterBox2:
{
char text [256];
text[0] = '\0';
SendMessage(GetDlgItem(hDlg, IDC_FILTERBOX2), WM_GETTEXT, 256,(LPARAM)text);
SendMessageA(GetDlgItem(hDlg, IDC_FILTERBOX2), WM_GETTEXT, 256,(LPARAM)text);
int scale = GUI.Scale;
for(int i=0; i<NUM_FILTERS; i++)
@ -7386,6 +7388,7 @@ updateFilterBox2:
fullscreenWanted = (bool)(IsDlgButtonChecked(hDlg, IDC_FULLSCREEN)==BST_CHECKED);
GUI.EmulateFullscreen = (bool)(IsDlgButtonChecked(hDlg, IDC_EMUFULLSCREEN)==BST_CHECKED);
Settings.DisplayFrameRate = IsDlgButtonChecked(hDlg, IDC_SHOWFPS);
GUI.BlendHiRes = (bool)(IsDlgButtonChecked(hDlg, IDC_HIRESBLEND)==BST_CHECKED);
index = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_RESOLUTION));
@ -7438,7 +7441,7 @@ updateFilterBox2:
GFX.RealPPL = prevPPL;
GUI.Stretch = prevStretch;
Settings.AutoDisplayMessages = prevAutoDisplayMessages;
GUI.BilinearFilter = prevVideoMemory;
GUI.BilinearFilter = prevBilinearFilter;
GUI.AspectRatio = prevAspectRatio;
GUI.AspectWidth = prevAspectWidth;
GUI.HeightExtend = prevHeightExtend;

View File

@ -300,6 +300,7 @@ struct sGUI {
dMode FullscreenMode;
RenderFilter Scale;
RenderFilter ScaleHiRes;
bool BlendHiRes;
bool DoubleBuffered;
bool FullScreen;
bool Stretch;