[Glide64]rename wrpResolution to m_FullScreenRes

This commit is contained in:
zilmar 2017-03-13 17:33:08 +11:00
parent 30fc06152f
commit 7a43073eef
5 changed files with 29 additions and 13 deletions

View File

@ -306,7 +306,7 @@ public:
{
m_cmbFSResolution.AddString(aRes[r]);
}
m_cmbFSResolution.SetCurSel(g_settings->wrpResolution < size ? g_settings->wrpResolution : 0);
m_cmbFSResolution.SetCurSel(g_settings->FullScreenRes() < size ? g_settings->FullScreenRes() : 0);
}
TTSetTxt(IDC_CMB_FS_RESOLUTION, "Full screen resolution:\n\nThis sets the full screen resolution.\nAll the resolutions that your video card / monitor support should be displayed.\n\n[Recommended:native(max) resolution of your monitor - unless performance becomes an issue]");
@ -337,7 +337,7 @@ public:
g_settings->SetScreenRes(m_WindowRes.GetCurSel());
g_settings->SetVsync(m_cbxVSync.GetCheck() == BST_CHECKED);
g_settings->SetTexenhOptions(m_cbxTextureSettings.GetCheck() == BST_CHECKED);
g_settings->wrpResolution = m_cmbFSResolution.GetCurSel();
g_settings->SetFullScreenRes(m_cmbFSResolution.GetCurSel());
g_settings->wrpAnisotropic = m_cbxAnisotropic.GetCheck() == BST_CHECKED;
g_settings->wrpVRAM = m_cbxVRAM.GetCheck() == BST_CHECKED ? 0 : atoi(spinVRAM);
g_settings->wrpFBO = m_cbxFBO.GetCheck() == BST_CHECKED;

View File

@ -393,7 +393,7 @@ void SetWindowDisplaySize(HWND hWnd)
g_windowedStyle = GetWindowLong(hWnd, GWL_STYLE);
// primary monitor only
if (!EnterFullScreen(g_settings->wrpResolution))
if (!EnterFullScreen(g_settings->FullScreenRes()))
{
WriteTrace(TraceGlitch, TraceWarning, "can't change to fullscreen mode");
}

View File

@ -331,7 +331,7 @@ char ** grQueryResolutionsExt(int32_t * Size)
uint32_t grWrapperFullScreenResolutionExt(uint32_t * width, uint32_t * height)
{
WriteTrace(TraceGlitch, TraceDebug, "-");
g_FullScreenResolutions.getResolution(g_settings->wrpResolution, width, height);
return g_settings->wrpResolution;
g_FullScreenResolutions.getResolution(g_settings->FullScreenRes(), width, height);
return g_settings->FullScreenRes();
}
#endif

View File

@ -85,7 +85,7 @@ CSettings::CSettings() :
//wrapper settings
#ifndef ANDROID
wrpResolution(0),
m_FullScreenRes(0),
#endif
wrpVRAM(0),
wrpFBO(0),
@ -232,8 +232,8 @@ void CSettings::UpdateScreenSize(bool fullscreen)
#ifndef ANDROID
if (fullscreen)
{
g_width = GetFullScreenResWidth(wrpResolution);
g_height = GetFullScreenResHeight(wrpResolution);
g_width = GetFullScreenResWidth(m_FullScreenRes);
g_height = GetFullScreenResHeight(m_FullScreenRes);
}
else
{
@ -490,6 +490,17 @@ void CSettings::SetUcode(ucode_t value)
m_ucode = value;
}
#ifndef ANDROID
void CSettings::SetFullScreenRes(uint32_t value)
{
if (value != m_FullScreenRes)
{
m_FullScreenRes = value;
m_dirty = true;
}
}
#endif
void CSettings::UpdateAspectRatio(void)
{
switch (m_aspectmode)
@ -531,7 +542,7 @@ void CSettings::ReadSettings()
{
SetScreenRes(GetSetting(Set_Resolution));
#ifndef ANDROID
this->wrpResolution = GetSetting(Set_FullScreenRes);
SetFullScreenRes(GetSetting(Set_FullScreenRes));
#endif
m_vsync = GetSetting(Set_vsync) != 0;
m_rotate = (ScreenRotate_t)GetSetting(Set_Rotate);
@ -801,8 +812,8 @@ void CSettings::ReadGameSettings(const char * name)
void CSettings::WriteSettings(void)
{
SetSetting(Set_Resolution, g_settings->m_ScreenRes);
#ifdef _WIN32
SetSetting(Set_FullScreenRes, g_settings->wrpResolution);
#ifndef ANDROID
SetSetting(Set_FullScreenRes, m_FullScreenRes);
#endif
SetSetting(Set_vsync, m_vsync ? 1 : 0);
SetSetting(Set_Rotate, m_rotate);

View File

@ -259,7 +259,7 @@ public:
//wrapper settings
#ifndef ANDROID
int wrpResolution;
inline uint32_t FullScreenRes(void) const { return m_FullScreenRes; }
#endif
int wrpVRAM;
int wrpFBO;
@ -294,7 +294,9 @@ public:
void UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove);
ucode_t DetectUCode(uint32_t uc_crc);
void SetUcode(ucode_t value);
#ifndef ANDROID
void SetFullScreenRes(uint32_t value);
#endif
void ReadSettings();
void ReadGameSettings(const char * name);
void WriteSettings(void);
@ -313,6 +315,9 @@ private:
short m_Set_texture_dir;
bool m_dirty;
#ifndef ANDROID
uint32_t m_FullScreenRes;
#endif
bool m_FlushLogs;
char m_log_dir[260];
uint32_t m_ScreenRes;