Added high resolution mode setting toggle on Win32.

This commit is contained in:
Jean-Philip Desjardins 2016-01-21 10:22:18 -05:00
parent 44178a0128
commit f10b2da704
7 changed files with 25 additions and 5 deletions

View File

@ -45,6 +45,17 @@ CGSH_OpenGL::~CGSH_OpenGL()
delete [] m_pCvtBuffer;
}
void CGSH_OpenGL::FlushFramebuffers()
{
m_mailBox.SendCall(
[this] ()
{
m_framebuffers.clear();
m_depthbuffers.clear();
}
);
}
void CGSH_OpenGL::InitializeImpl()
{
InitializeRC();

View File

@ -31,6 +31,7 @@ public:
protected:
void TexCache_Flush();
void PalCache_Flush();
void FlushFramebuffers();
void LoadPreferences();
virtual void InitializeImpl() override;
virtual void ReleaseImpl() override;

View File

@ -92,6 +92,7 @@ void CGSH_OpenGLWin32::OnSettingsDialogDestroyed()
LoadPreferences();
TexCache_Flush();
PalCache_Flush();
FlushFramebuffers();
}
CGSHandler* CGSH_OpenGLWin32::GSHandlerFactory(Framework::Win32::CWindow* outputWindow)

View File

@ -8,8 +8,10 @@ CGSH_OpenGL_SettingsWnd::CGSH_OpenGL_SettingsWnd(HWND parentWindow)
{
SetClassPtr();
m_enableHighResMode = Framework::Win32::CButton(GetItem(IDC_GSHOPENGL_SETTINGS_ENABLEHIGHRESMODE));
m_forceBilinearTextures = Framework::Win32::CButton(GetItem(IDC_GSHOPENGL_SETTINGS_FORCEBILINEAR));
m_enableHighResMode.SetCheck(CAppConfig::GetInstance().GetPreferenceBoolean(PREF_CGSH_OPENGL_ENABLEHIGHRESMODE));
m_forceBilinearTextures.SetCheck(CAppConfig::GetInstance().GetPreferenceBoolean(PREF_CGSH_OPENGL_FORCEBILINEARTEXTURES));
}
@ -37,5 +39,6 @@ long CGSH_OpenGL_SettingsWnd::OnCommand(unsigned short id, unsigned short cmd, H
void CGSH_OpenGL_SettingsWnd::Save()
{
CAppConfig::GetInstance().SetPreferenceBoolean(PREF_CGSH_OPENGL_ENABLEHIGHRESMODE, m_enableHighResMode.GetCheck());
CAppConfig::GetInstance().SetPreferenceBoolean(PREF_CGSH_OPENGL_FORCEBILINEARTEXTURES, m_forceBilinearTextures.GetCheck());
}

View File

@ -15,5 +15,6 @@ protected:
private:
void Save();
Framework::Win32::CButton m_enableHighResMode;
Framework::Win32::CButton m_forceBilinearTextures;
};

View File

@ -52,15 +52,17 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,246,138,60,18
END
IDD_GSHOPENGL_SETTINGS DIALOGEX 0, 0, 307, 35
IDD_GSHOPENGL_SETTINGS DIALOGEX 0, 0, 307, 47
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Video Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "Force bilinear texture filtering",IDC_GSHOPENGL_SETTINGS_FORCEBILINEAR,
CONTROL "Enable high resolution mode",IDC_GSHOPENGL_SETTINGS_ENABLEHIGHRESMODE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,6,294,10
DEFPUSHBUTTON "OK",IDOK,174,18,60,12
PUSHBUTTON "Cancel",IDCANCEL,240,18,60,12
CONTROL "Force bilinear texture filtering",IDC_GSHOPENGL_SETTINGS_FORCEBILINEAR,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,18,294,10
DEFPUSHBUTTON "OK",IDOK,174,30,60,12
PUSHBUTTON "Cancel",IDCANCEL,240,30,60,12
END
@ -85,7 +87,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 300
TOPMARGIN, 7
BOTTOMMARGIN, 28
BOTTOMMARGIN, 40
END
END
#endif // APSTUDIO_INVOKED

View File

@ -29,6 +29,7 @@
#define IDD_GSHOPENGL_SETTINGS 131
#define IDC_CALLSTACKITEM_LIST 1001
#define IDC_GSHOPENGL_SETTINGS_FORCEBILINEAR 1004
#define IDC_GSHOPENGL_SETTINGS_ENABLEHIGHRESMODE 1005
#define ID_FILE_EXIT 40002
#define ID_FILE_OPENELF 40003
#define ID_WINDOW_TILEHORIZONTAL 40006