Merge pull request #386 from raven02/patch-11

Obsolete option "480p downscale" and make it auto rescale whenever appro...
This commit is contained in:
Alexandro Sánchez Bach 2014-07-02 19:20:09 +02:00
commit e29a1ddef7
3 changed files with 43 additions and 24 deletions

View File

@ -1332,34 +1332,61 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
}
gcmBuffer* buffers = (gcmBuffer*)Memory.GetMemFromAddr(m_gcm_buffers_addr);
m_buffer_width = re(buffers[m_gcm_current_buffer].width);
m_buffer_height = re(buffers[m_gcm_current_buffer].height);
m_width = m_buffer_width = re(buffers[m_gcm_current_buffer].width);
m_height = m_buffer_height = re(buffers[m_gcm_current_buffer].height);
m_width = m_buffer_width;
m_height = m_buffer_height;
// Rescale native 1080p to fit 720p/480p window size
if (m_buffer_width == 1920 && m_buffer_height == 1080)
{
switch (Ini.GSResolution.GetValue())
{
case 2: // 1280x720 window size
m_width_scale = m_height_scale = 1.33f;
m_width = 1280;
m_height = 720;
break;
case 4: // 720x480 window size
m_width_scale = 0.75f;
m_height_scale = 0.88f;
m_width = 720;
m_height = 480;
break;
}
}
if (Ini.GSDownscale.GetValue() && Ini.GSResolution.GetValue() == 4)
// Rescale native 720p to fit 480p window size
if (m_buffer_width == 1280 && m_buffer_height == 720)
{
if (m_width == 1280 && m_height == 720)
if (Ini.GSResolution.GetValue() == 4) // 720x480 window size
{
// Set scale ratio for 720p
m_width_scale = 1.125f;
m_height_scale = 1.33f;
// Downscale 720p to 480p
m_width = 720;
m_height = 480;
}
}
if (m_width == 1920 && m_height == 1080)
// Rescale native 960x540 to fit 1080p/720p/480p window size
if (m_buffer_width == 960 && m_buffer_height == 540)
{
// Set scale ratio for 1080p
m_width_scale = 0.75f;
m_height_scale = 0.88f;
// Downscale 1080p to 480p
switch (Ini.GSResolution.GetValue())
{
case 1:// 1920x1080 window size
m_width_scale = m_height_scale = 4.0f;
m_width = 1980;
m_height = 1080;
break;
case 2: // 1280x720 window size
m_width_scale = m_height_scale = 2.66f;
m_width = 1280;
m_height = 720;
break;
case 4: // 720x480 window size
m_width_scale = 1.5f;
m_height_scale = 1.77f;
m_width = 720;
m_height = 480;
break;
}
}
}

View File

@ -420,7 +420,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
wxCheckBox* chbox_gs_log_prog = new wxCheckBox(p_graphics, wxID_ANY, "Log vertex/fragment programs");
wxCheckBox* chbox_gs_dump_depth = new wxCheckBox(p_graphics, wxID_ANY, "Write Depth Buffer");
wxCheckBox* chbox_gs_dump_color = new wxCheckBox(p_graphics, wxID_ANY, "Write Color Buffers");
wxCheckBox* chbox_gs_downscale = new wxCheckBox(p_graphics, wxID_ANY, "480p Downscale");
wxCheckBox* chbox_gs_vsync = new wxCheckBox(p_graphics, wxID_ANY, "VSync");
wxCheckBox* chbox_audio_dump = new wxCheckBox(p_audio, wxID_ANY, "Dump to file");
wxCheckBox* chbox_audio_conv = new wxCheckBox(p_audio, wxID_ANY, "Convert to 16 bit");
@ -498,7 +497,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
chbox_gs_log_prog ->SetValue(Ini.GSLogPrograms.GetValue());
chbox_gs_dump_depth ->SetValue(Ini.GSDumpDepthBuffer.GetValue());
chbox_gs_dump_color ->SetValue(Ini.GSDumpColorBuffers.GetValue());
chbox_gs_downscale ->SetValue(Ini.GSDownscale.GetValue());
chbox_gs_vsync ->SetValue(Ini.GSVSyncEnable.GetValue());
chbox_audio_dump ->SetValue(Ini.AudioDumpToFile.GetValue());
chbox_audio_conv ->SetValue(Ini.AudioConvertToU16.GetValue());
@ -558,7 +556,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
s_subpanel_graphics->Add(chbox_gs_dump_depth, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(chbox_gs_dump_color, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(chbox_gs_vsync, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(chbox_gs_downscale, wxSizerFlags().Border(wxALL, 5).Expand());
// Input - Output
s_subpanel_io->Add(s_round_io_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand());
@ -606,7 +603,6 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
Ini.GSResolution.SetValue(ResolutionNumToId(cbox_gs_resolution->GetSelection() + 1));
Ini.GSAspectRatio.SetValue(cbox_gs_aspect->GetSelection() + 1);
Ini.GSVSyncEnable.SetValue(chbox_gs_vsync->GetValue());
Ini.GSDownscale.SetValue(chbox_gs_downscale->GetValue());
Ini.GSLogPrograms.SetValue(chbox_gs_log_prog->GetValue());
Ini.GSDumpDepthBuffer.SetValue(chbox_gs_dump_depth->GetValue());
Ini.GSDumpColorBuffers.SetValue(chbox_gs_dump_color->GetValue());

View File

@ -115,7 +115,6 @@ public:
IniEntry<bool> GSLogPrograms;
IniEntry<bool> GSDumpColorBuffers;
IniEntry<bool> GSDumpDepthBuffer;
IniEntry<bool> GSDownscale;
// Audio
IniEntry<u8> AudioOutMode;
@ -182,7 +181,6 @@ public:
GSLogPrograms.Init("GS_LogPrograms", path);
GSDumpColorBuffers.Init("GS_DumpColorBuffers", path);
GSDumpDepthBuffer.Init("GS_DumpDepthBuffer", path);
GSDownscale.Init("GS_Downscale", path);
// Audio
AudioOutMode.Init("Audio_AudioOutMode", path);
@ -245,7 +243,6 @@ public:
GSLogPrograms.Load(false);
GSDumpColorBuffers.Load(false);
GSDumpDepthBuffer.Load(false);
GSDownscale.Load(false);
// Audio
AudioOutMode.Load(1);
@ -309,7 +306,6 @@ public:
GSLogPrograms.Save();
GSDumpColorBuffers.Save();
GSDumpDepthBuffer.Save();
GSDownscale.Save();
// Audio
AudioOutMode.Save();