Implemented frame limiter

Some errors in unpkg replaced with warnings
This commit is contained in:
DHrpcs3 2014-12-21 22:42:15 +02:00
parent 0011a50c0b
commit 969cf67ba8
8 changed files with 79 additions and 37 deletions

View file

@ -378,6 +378,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
wxStaticBoxSizer* s_round_gs_render = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Render"));
wxStaticBoxSizer* s_round_gs_res = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Default resolution"));
wxStaticBoxSizer* s_round_gs_aspect = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Default aspect ratio"));
wxStaticBoxSizer* s_round_gs_frame_limit = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Frame limit"));
// Input / Output
wxStaticBoxSizer* s_round_io_pad_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Pad Handler"));
@ -402,6 +403,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
wxComboBox* cbox_gs_render = new wxComboBox(p_graphics, wxID_ANY);
wxComboBox* cbox_gs_resolution = new wxComboBox(p_graphics, wxID_ANY);
wxComboBox* cbox_gs_aspect = new wxComboBox(p_graphics, wxID_ANY);
wxComboBox* cbox_gs_frame_limit = new wxComboBox(p_graphics, wxID_ANY);
wxComboBox* cbox_pad_handler = new wxComboBox(p_io, wxID_ANY);
wxComboBox* cbox_keyboard_handler = new wxComboBox(p_io, wxID_ANY);
wxComboBox* cbox_mouse_handler = new wxComboBox(p_io, wxID_ANY);
@ -448,6 +450,9 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
cbox_gs_aspect->Append("4:3");
cbox_gs_aspect->Append("16:9");
for (auto item : { "Off", "50", "59.94", "Auto" })
cbox_gs_frame_limit->Append(item);
cbox_pad_handler->Append("Null");
cbox_pad_handler->Append("Windows");
#if defined (_WIN32)
@ -523,6 +528,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
cbox_gs_render ->SetSelection(Ini.GSRenderMode.GetValue());
cbox_gs_resolution ->SetSelection(ResolutionIdToNum(Ini.GSResolution.GetValue()) - 1);
cbox_gs_aspect ->SetSelection(Ini.GSAspectRatio.GetValue() - 1);
cbox_gs_frame_limit ->SetSelection(Ini.GSFrameLimit.GetValue());
cbox_pad_handler ->SetSelection(Ini.PadHandlerMode.GetValue());
cbox_keyboard_handler->SetSelection(Ini.KeyboardHandlerMode.GetValue());
cbox_mouse_handler ->SetSelection(Ini.MouseHandlerMode.GetValue());
@ -545,6 +551,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
s_round_gs_render->Add(cbox_gs_render, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_gs_res->Add(cbox_gs_resolution, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_gs_aspect->Add(cbox_gs_aspect, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_gs_frame_limit->Add(cbox_gs_frame_limit, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_io_pad_handler->Add(cbox_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_io_keyboard_handler->Add(cbox_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand());
@ -567,6 +574,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
s_subpanel_graphics->Add(s_round_gs_render, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(s_round_gs_res, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(s_round_gs_aspect, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(s_round_gs_frame_limit, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(chbox_gs_log_prog, wxSizerFlags().Border(wxALL, 5).Expand());
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());
@ -628,6 +636,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
Ini.GSRenderMode.SetValue(cbox_gs_render->GetSelection());
Ini.GSResolution.SetValue(ResolutionNumToId(cbox_gs_resolution->GetSelection() + 1));
Ini.GSAspectRatio.SetValue(cbox_gs_aspect->GetSelection() + 1);
Ini.GSFrameLimit.SetValue(cbox_gs_frame_limit->GetSelection());
Ini.GSLogPrograms.SetValue(chbox_gs_log_prog->GetValue());
Ini.GSDumpDepthBuffer.SetValue(chbox_gs_dump_depth->GetValue());
Ini.GSDumpColorBuffers.SetValue(chbox_gs_dump_color->GetValue());