diff --git a/pcsx2/Config.h b/pcsx2/Config.h index dcf794b0d5..90db068221 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -501,13 +501,9 @@ struct Pcsx2Config // style. Useful for debugging potential bugs in the MTGS pipeline. bool SynchronousMTGS{false}; bool FrameLimitEnable{true}; - bool FrameSkipEnable{false}; VsyncMode VsyncEnable{VsyncMode::Off}; - int FramesToDraw{2}; // number of consecutive frames (fields) to render - int FramesToSkip{2}; // number of consecutive frames (fields) to skip - double LimitScalar{1.0}; double FramerateNTSC{59.94}; double FrameratePAL{50.00}; @@ -887,9 +883,6 @@ struct Pcsx2Config // ------------------------------------------------------------------------ struct FramerateOptions { - bool SkipOnLimit{false}; - bool SkipOnTurbo{false}; - double NominalScalar{1.0}; double TurboScalar{2.0}; double SlomoScalar{0.5}; @@ -899,7 +892,7 @@ struct Pcsx2Config bool operator==(const FramerateOptions& right) const { - return OpEqu(SkipOnLimit) && OpEqu(SkipOnTurbo) && OpEqu(NominalScalar) && OpEqu(TurboScalar) && OpEqu(SlomoScalar); + return OpEqu(NominalScalar) && OpEqu(TurboScalar) && OpEqu(SlomoScalar); } bool operator!=(const FramerateOptions& right) const diff --git a/pcsx2/Counters.cpp b/pcsx2/Counters.cpp index e8d0426931..41e1bf8712 100644 --- a/pcsx2/Counters.cpp +++ b/pcsx2/Counters.cpp @@ -561,7 +561,6 @@ static __fi void frameLimitUpdateCore() // Framelimiter - Measures the delta time between calls and stalls until a // certain amount of time passes if such time hasn't passed yet. -// See the GS FrameSkip function for details on why this is here and not in the GS. static __fi void frameLimit() { // Framelimiter off in settings? Framelimiter go brrr. diff --git a/pcsx2/GS.cpp b/pcsx2/GS.cpp index 8bc57a5064..ac980cfb69 100644 --- a/pcsx2/GS.cpp +++ b/pcsx2/GS.cpp @@ -358,71 +358,6 @@ void gsIrq() { hwIntcIrq(INTC_GS); } -// -------------------------------------------------------------------------------------- -// gsFrameSkip -// -------------------------------------------------------------------------------------- -// This function regulates the frameskipping status of the GS. Our new frameskipper for -// 0.9.7 is a very simple logic pattern compared to the old mess. The goal now is to provide -// the most compatible and efficient frameskip, instead of doing the adaptive logic of -// 0.9.6. This is almost a necessity because of how many games treat the GS: they upload -// great amounts of data while rendering 2 frames at a time (using double buffering), and -// then use a simple pageswap to display the contents of the second frame for that vsync. -// (this approach is mostly seen on interlace games; progressive games less so) -// The result is that any skip pattern besides a fully consistent 2on,2off would reuslt in -// tons of missing geometry, rendering frameskip useless. -// -// So instead we use a simple "always skipping" or "never skipping" logic. -// -// EE vs MTGS: -// This function does not regulate frame limiting, meaning it does no stalling. Stalling -// functions are performed by the EE, which itself uses thread sleep logic to avoid spin -// waiting as much as possible (maximizes CPU resource availability for the GS). -static bool s_isSkippingCurrentFrame = false; - -__fi void gsFrameSkip() -{ - static int consec_skipped = 0; - static int consec_drawn = 0; - - if( !EmuConfig.GS.FrameSkipEnable ) - { - if( s_isSkippingCurrentFrame ) - { - // Frameskipping disabled on-the-fly .. make sure the GS is restored to non-skip - // behavior. - GSsetFrameSkip( false ); - s_isSkippingCurrentFrame = false; - } - return; - } - - GSsetFrameSkip( s_isSkippingCurrentFrame ); - - if( s_isSkippingCurrentFrame ) - { - ++consec_skipped; - if( consec_skipped >= EmuConfig.GS.FramesToSkip ) - { - consec_skipped = 0; - s_isSkippingCurrentFrame = false; - } - } - else - { - ++consec_drawn; - if( consec_drawn >= EmuConfig.GS.FramesToDraw ) - { - consec_drawn = 0; - s_isSkippingCurrentFrame = true; - } - } -} - -extern bool gsIsSkippingCurrentFrame() -{ - return s_isSkippingCurrentFrame; -} - //These are done at VSync Start. Drawing is done when VSync is off, then output the screen when Vsync is on //The GS needs to be told at the start of a vsync else it loses half of its picture (could be responsible for some halfscreen issues) //We got away with it before i think due to our awful GS timing, but now we have it right (ish) @@ -435,17 +370,6 @@ void gsPostVsyncStart() GetMTGS().PostVsyncStart(registers_written); } -void _gs_ResetFrameskip() -{ - GSsetFrameSkip( 0 ); -} - -// Disables the GS Frameskip at runtime without any racy mess... -void gsResetFrameSkip() -{ - GetMTGS().SendSimplePacket(GS_RINGTYPE_FRAMESKIP, 0, 0, 0); -} - void SaveStateBase::gsFreeze() { FreezeMem(PS2MEM_GS, 0x2000); diff --git a/pcsx2/GS.h b/pcsx2/GS.h index 8f937fec42..58c578a640 100644 --- a/pcsx2/GS.h +++ b/pcsx2/GS.h @@ -294,7 +294,6 @@ enum MTGS_RingCommand GS_RINGTYPE_P2, GS_RINGTYPE_P3, GS_RINGTYPE_VSYNC, - GS_RINGTYPE_FRAMESKIP, GS_RINGTYPE_FREEZE, GS_RINGTYPE_RESET, // issues a GSreset() command. GS_RINGTYPE_SOFTRESET, // issues a soft reset for the GIF @@ -441,19 +440,11 @@ extern SysMtgsThread& GetMTGS(); ///////////////////////////////////////////////////////////////////////////// // Generalized GS Functions and Stuff -extern s32 gsOpen(); -extern void gsClose(); extern void gsReset(); extern void gsSetVideoMode(GS_VideoMode mode); -extern void gsResetFrameSkip(); extern void gsPostVsyncStart(); -extern void gsFrameSkip(); -extern bool gsIsSkippingCurrentFrame(); extern void gsUpdateFrequency(Pcsx2Config& config); -// Some functions shared by both the GS and MTGS -extern void _gs_ResetFrameskip(); - extern void gsWrite8(u32 mem, u8 value); extern void gsWrite16(u32 mem, u16 value); extern void gsWrite32(u32 mem, u32 value); diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index 266cf04df9..365c7ecaaf 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -656,11 +656,6 @@ void GSsetGameCRC(u32 crc, int options) g_gs_renderer->SetGameCRC(crc, options); } -void GSsetFrameSkip(int frameskip) -{ - g_gs_renderer->SetFrameSkip(frameskip); -} - GSVideoMode GSgetDisplayMode() { GSRenderer* gs = g_gs_renderer.get(); diff --git a/pcsx2/GS/GS.h b/pcsx2/GS/GS.h index 49db461d32..09464b4552 100644 --- a/pcsx2/GS/GS.h +++ b/pcsx2/GS/GS.h @@ -80,7 +80,6 @@ bool GSsetupRecording(std::string& filename); void GSendRecording(); #endif void GSsetGameCRC(u32 crc, int options); -void GSsetFrameSkip(int frameskip); GSVideoMode GSgetDisplayMode(); void GSgetInternalResolution(int* width, int* height); diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 6d5f94a7b0..8256893d55 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -48,7 +48,6 @@ GSState::GSState() , m_regs(NULL) , m_crc(0) , m_options(0) - , m_frameskip(0) { // m_nativeres seems to be a hack. Unfortunately it impacts draw call number which make debug painful in the replayer. // Let's keep it disabled to ease debug. @@ -150,34 +149,6 @@ GSState::~GSState() _aligned_free(m_index.buff); } -void GSState::SetFrameSkip(int skip) -{ - if (m_frameskip == skip) - return; - - m_frameskip = skip; - - if (skip) - { - m_fpGIFPackedRegHandlers[GIF_REG_XYZF2] = &GSState::GIFPackedRegHandlerNOP; - m_fpGIFPackedRegHandlers[GIF_REG_XYZ2] = &GSState::GIFPackedRegHandlerNOP; - m_fpGIFPackedRegHandlers[GIF_REG_XYZF3] = &GSState::GIFPackedRegHandlerNOP; - m_fpGIFPackedRegHandlers[GIF_REG_XYZ3] = &GSState::GIFPackedRegHandlerNOP; - - m_fpGIFRegHandlers[GIF_A_D_REG_XYZF2] = &GSState::GIFRegHandlerNOP; - m_fpGIFRegHandlers[GIF_A_D_REG_XYZ2] = &GSState::GIFRegHandlerNOP; - m_fpGIFRegHandlers[GIF_A_D_REG_XYZF3] = &GSState::GIFRegHandlerNOP; - m_fpGIFRegHandlers[GIF_A_D_REG_XYZ3] = &GSState::GIFRegHandlerNOP; - - m_fpGIFPackedRegHandlersC[GIF_REG_STQRGBAXYZF2] = &GSState::GIFPackedRegHandlerNOP; - m_fpGIFPackedRegHandlersC[GIF_REG_STQRGBAXYZ2] = &GSState::GIFPackedRegHandlerNOP; - } - else - { - UpdateVertexKick(); - } -} - void GSState::Reset(bool hardware_reset) { // FIXME: bios logo not shown cut in half after reset, missing graphics in GoW after first FMV @@ -2562,9 +2533,6 @@ void GSState::UpdateScissor() void GSState::UpdateVertexKick() { - if (m_frameskip) - return; - const u32 prim = PRIM->PRIM; m_fpGIFPackedRegHandlers[GIF_REG_XYZF2] = m_fpGIFPackedRegHandlerXYZ[prim][0]; diff --git a/pcsx2/GS/GSState.h b/pcsx2/GS/GSState.h index 83aaed3a73..0cf7c37e4f 100644 --- a/pcsx2/GS/GSState.h +++ b/pcsx2/GS/GSState.h @@ -230,7 +230,6 @@ public: CRC::Game m_game; std::unique_ptr m_dump; int m_options; - int m_frameskip; bool m_nativeres; bool m_mipmap; bool m_primflush; @@ -344,7 +343,6 @@ public: u8* GetRegsMem() const { return reinterpret_cast(m_regs); } void SetRegsMem(u8* basemem) { m_regs = reinterpret_cast(basemem); } - void SetFrameSkip(int skip); void DumpVertices(const std::string& filename); PRIM_OVERLAP PrimitiveOverlap(); diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index ff3ad64a6d..3808c069c0 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -514,7 +514,7 @@ void GSRenderer::VSync(u32 field, bool registers_written) const int fb_sprite_blits = g_perfmon.GetDisplayFramebufferSpriteBlits(); const bool fb_sprite_frame = (fb_sprite_blits > 0); - bool skip_frame = m_frameskip; + bool skip_frame = false; if (GSConfig.SkipDuplicateFrames) { bool is_unique_frame; diff --git a/pcsx2/MTGS.cpp b/pcsx2/MTGS.cpp index d11e65bb6c..6ea34b15f5 100644 --- a/pcsx2/MTGS.cpp +++ b/pcsx2/MTGS.cpp @@ -181,7 +181,6 @@ void SysMtgsThread::ResetGS(bool hardware_reset) MTGS_LOG("MTGS: Sending Reset..."); SendSimplePacket(GS_RINGTYPE_RESET, static_cast(hardware_reset), 0, 0); - SendSimplePacket(GS_RINGTYPE_FRAMESKIP, 0, 0, 0); SetEvent(); } @@ -463,7 +462,6 @@ void SysMtgsThread::MainLoop() // CSR & 0x2000; is the pageflip id. GSvsync((((u32&)RingBuffer.Regs[0x1000]) & 0x2000) ? 0 : 1, remainder[4] != 0); - gsFrameSkip(); m_QueuedFrameCount.fetch_sub(1); if (m_VsyncSignalListener.exchange(false)) @@ -483,11 +481,6 @@ void SysMtgsThread::MainLoop() } break; - case GS_RINGTYPE_FRAMESKIP: - MTGS_LOG("(MTGS Packet Read) ringtype=Frameskip"); - _gs_ResetFrameskip(); - break; - case GS_RINGTYPE_FREEZE: { MTGS_FreezeData* data = (MTGS_FreezeData*)tag.pointer; diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 4f7fd52a36..f0cf6ce0df 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -361,12 +361,8 @@ bool Pcsx2Config::GSOptions::operator==(const GSOptions& right) const OpEqu(SynchronousMTGS) && OpEqu(VsyncQueueSize) && - OpEqu(FrameSkipEnable) && OpEqu(FrameLimitEnable) && - OpEqu(FramesToDraw) && - OpEqu(FramesToSkip) && - OpEqu(LimitScalar) && OpEqu(FramerateNTSC) && OpEqu(FrameratePAL) && @@ -457,16 +453,12 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap) SettingsWrapEntry(VsyncQueueSize); SettingsWrapEntry(FrameLimitEnable); - SettingsWrapEntry(FrameSkipEnable); wrap.EnumEntry(CURRENT_SETTINGS_SECTION, "VsyncEnable", VsyncEnable, NULL, VsyncEnable); // LimitScalar is set at runtime. SettingsWrapEntry(FramerateNTSC); SettingsWrapEntry(FrameratePAL); - SettingsWrapEntry(FramesToDraw); - SettingsWrapEntry(FramesToSkip); - #ifdef PCSX2_CORE // These are loaded from GSWindow in wx. SettingsWrapBitBool(SyncToHostRefreshRate); @@ -1005,9 +997,6 @@ void Pcsx2Config::FramerateOptions::LoadSave(SettingsWrapper& wrap) SettingsWrapEntry(NominalScalar); SettingsWrapEntry(TurboScalar); SettingsWrapEntry(SlomoScalar); - - SettingsWrapEntry(SkipOnLimit); - SettingsWrapEntry(SkipOnTurbo); } Pcsx2Config::Pcsx2Config() diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index 6d2b1df4e0..daa74f9c74 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -1033,9 +1033,6 @@ bool AppConfig::IsOkApplyPreset(int n, bool ignoreMTVU) EmuOptions.EnablePatches = true; EmuOptions.GS.SynchronousMTGS = default_Pcsx2Config.GS.SynchronousMTGS; - EmuOptions.GS.FrameSkipEnable = default_Pcsx2Config.GS.FrameSkipEnable; - EmuOptions.GS.FramesToDraw = default_Pcsx2Config.GS.FramesToDraw; - EmuOptions.GS.FramesToSkip = default_Pcsx2Config.GS.FramesToSkip; EmuOptions.Cpu = default_Pcsx2Config.Cpu; EmuOptions.Gamefixes = default_Pcsx2Config.Gamefixes; diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index cc2daebe7f..de08c60294 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -77,7 +77,6 @@ void GSPanel::InitDefaultAccelerators() m_Accels->Map( AAC( WXK_F2 ).Shift(), "States_CycleSlotBackward" ); m_Accels->Map( AAC( WXK_F4 ), "Framelimiter_MasterToggle"); - m_Accels->Map( AAC( WXK_F4 ).Shift(), "Frameskip_Toggle"); m_Accels->Map( AAC( WXK_TAB ), "Framelimiter_TurboToggle" ); m_Accels->Map( AAC( WXK_TAB ).Shift(), "Framelimiter_SlomoToggle" ); diff --git a/pcsx2/gui/GlobalCommands.cpp b/pcsx2/gui/GlobalCommands.cpp index 9fa0503931..4dfb46586e 100644 --- a/pcsx2/gui/GlobalCommands.cpp +++ b/pcsx2/gui/GlobalCommands.cpp @@ -65,21 +65,6 @@ wxString KeyAcceleratorCode::ToString() const namespace Implementations { - void Frameskip_Toggle() - { - g_Conf->EmuOptions.GS.FrameSkipEnable = !g_Conf->EmuOptions.GS.FrameSkipEnable; - EmuConfig.GS.FrameSkipEnable = g_Conf->EmuOptions.GS.FrameSkipEnable; - - if (EmuConfig.GS.FrameSkipEnable) - { - Host::AddKeyedFormattedOSDMessage("FrameSkipping", 2.0f, "Frameskip ENABLED. FrameDraws=%d, FrameSkips=%d", g_Conf->EmuOptions.GS.FramesToDraw, g_Conf->EmuOptions.GS.FramesToSkip); - } - else - { - Host::AddKeyedOSDMessage("FrameSkipping", "Frameskip DISABLED."); - } - } - void Framelimiter_TurboToggle() { ScopedCoreThreadPause pauser; @@ -89,39 +74,16 @@ namespace Implementations g_Conf->EmuOptions.GS.FrameLimitEnable = true; g_Conf->EmuOptions.LimiterMode = LimiterModeType::Turbo; Host::AddKeyedOSDMessage("FrameLimiter", "Turbo + Frame limiter ENABLED."); - g_Conf->EmuOptions.GS.FrameSkipEnable = !!EmuConfig.Framerate.SkipOnTurbo; } else if (g_Conf->EmuOptions.LimiterMode == LimiterModeType::Turbo) { g_Conf->EmuOptions.LimiterMode = LimiterModeType::Nominal; - - if (g_Conf->EmuOptions.Framerate.SkipOnLimit) - { - Host::AddKeyedOSDMessage("FrameLimiter", "Turbo DISABLED."); - Host::AddKeyedOSDMessage("FrameSkipping", "Frameskip ENABLED."); - g_Conf->EmuOptions.GS.FrameSkipEnable = true; - } - else - { - Host::AddKeyedOSDMessage("FrameLimiter", "Turbo DISABLED."); - g_Conf->EmuOptions.GS.FrameSkipEnable = false; - } + Host::AddKeyedOSDMessage("FrameLimiter", "Turbo DISABLED."); } else { g_Conf->EmuOptions.LimiterMode = LimiterModeType::Turbo; - - if (g_Conf->EmuOptions.Framerate.SkipOnTurbo) - { - Host::AddKeyedOSDMessage("FrameLimiter", "Turbo ENABLED."); - Host::AddKeyedOSDMessage("FrameSkipping", "Frameskip ENABLED."); - g_Conf->EmuOptions.GS.FrameSkipEnable = true; - } - else - { - Host::AddKeyedOSDMessage("FrameLimiter", "Turbo ENABLED."); - g_Conf->EmuOptions.GS.FrameSkipEnable = false; - } + Host::AddKeyedOSDMessage("FrameLimiter", "Turbo ENABLED."); } pauser.AllowResume(); @@ -654,14 +616,6 @@ static const GlobalCommandDescriptor CommandDeclarations[] = false, }, - { - "Frameskip_Toggle", - Implementations::Frameskip_Toggle, - NULL, - NULL, - false, - }, - { "Framelimiter_TurboToggle", Implementations::Framelimiter_TurboToggle, @@ -957,7 +911,6 @@ void Pcsx2App::InitDefaultGlobalAccelerators() GlobalAccels->Map(AAC(WXK_F2).Shift(), "States_CycleSlotBackward"); GlobalAccels->Map(AAC(WXK_F4), "Framelimiter_MasterToggle"); - GlobalAccels->Map(AAC(WXK_F4).Shift(), "Frameskip_Toggle"); // At this early stage of startup, the application assumes installed mode, so portable mode custom keybindings may present issues. // Relevant - https://github.com/PCSX2/pcsx2/blob/678829a5b2b8ca7a3e42d8edc9ab201bf00b0fe9/pcsx2/gui/AppInit.cpp#L479 diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index 1af9675a01..7663e6a25f 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -212,26 +212,6 @@ namespace Panels void OnRestoreDefaults(wxCommandEvent& evt); }; - // -------------------------------------------------------------------------------------- - // FrameSkipPanel - // -------------------------------------------------------------------------------------- - class FrameSkipPanel : public BaseApplicableConfigPanel_SpecificConfig - { - protected: - wxSpinCtrl* m_spin_FramesToSkip; - wxSpinCtrl* m_spin_FramesToDraw; - - pxRadioPanel* m_radio_SkipMode; - - public: - FrameSkipPanel(wxWindow* parent); - virtual ~FrameSkipPanel() = default; - - void Apply(); - void AppStatusEvent_OnSettingsApplied(); - void ApplyConfigToGui(AppConfig& configToApply, int flags = 0); - }; - // -------------------------------------------------------------------------------------- // FramelimiterPanel // -------------------------------------------------------------------------------------- @@ -304,7 +284,6 @@ namespace Panels pxCheckBox* m_check_SynchronousGS; wxSpinCtrl* m_spinner_VsyncQueue; wxButton* m_restore_defaults; - FrameSkipPanel* m_span; FramelimiterPanel* m_fpan; public: diff --git a/pcsx2/gui/Panels/VideoPanel.cpp b/pcsx2/gui/Panels/VideoPanel.cpp index d281ff6b08..6f0c5b52ef 100644 --- a/pcsx2/gui/Panels/VideoPanel.cpp +++ b/pcsx2/gui/Panels/VideoPanel.cpp @@ -162,120 +162,6 @@ void Panels::FramelimiterPanel::Apply() wxGetApp().Overrides.ProfilingMode = false; } -// -------------------------------------------------------------------------------------- -// FrameSkipPanel Implementations -// -------------------------------------------------------------------------------------- - -Panels::FrameSkipPanel::FrameSkipPanel( wxWindow* parent ) - : BaseApplicableConfigPanel_SpecificConfig( parent ) -{ - const RadioPanelItem FrameskipOptions[] = - { - RadioPanelItem( - _("Disabled [default]") - ), - // Implement custom hotkeys (Tab) with translatable string intact + not blank in GUI. - RadioPanelItem( - _("Skip only on Turbo, to enable press") + wxString::Format(" (%s)", wxGetApp().GlobalAccels->findKeycodeWithCommandId("Framelimiter_TurboToggle").toTitleizedString()) - ), - // Implement custom hotkeys (Shift + F4) with translatable string intact + not blank in GUI. - RadioPanelItem( - _("Constant skipping") + wxString::Format(" (%s)", wxGetApp().GlobalAccels->findKeycodeWithCommandId("Frameskip_Toggle").toTitleizedString()), - wxEmptyString, - _("Normal and Turbo limit rates skip frames. Slow motion mode will still disable frameskipping.") - ), - }; - - m_radio_SkipMode = new pxRadioPanel( this, FrameskipOptions ); - m_radio_SkipMode->Realize(); - - m_spin_FramesToDraw = new wxSpinCtrl(this); - m_spin_FramesToSkip = new wxSpinCtrl(this); - - // Set tooltips for spinners. - - - // ------------------------------------------------------------ - // Sizers and Layouts - - *this += m_radio_SkipMode; - - wxFlexGridSizer& s_spins( *new wxFlexGridSizer( 4 ) ); - //s_spins.AddGrowableCol( 0 ); - - s_spins += m_spin_FramesToDraw | pxBorder(wxTOP, 2); - s_spins += 10; - s_spins += Label(_("Frames to Draw")) | StdExpand(); - s_spins += 10; - - s_spins += m_spin_FramesToSkip | pxBorder(wxTOP, 2); - s_spins += 10; - s_spins += Label(_("Frames to Skip")) | StdExpand(); - s_spins += 10; - - *this += s_spins | StdExpand(); - - *this += Text( pxE( L"Notice: Due to PS2 hardware design, precise frame skipping is impossible. Enabling it will cause severe graphical errors in some games." ) - ) | StdExpand(); - - *this += 24; // Extends the right box to match the left one. Only works with (Windows) 100% dpi. - - AppStatusEvent_OnSettingsApplied(); -} - -void Panels::FrameSkipPanel::AppStatusEvent_OnSettingsApplied() -{ - ApplyConfigToGui( *g_Conf ); -} - -void Panels::FrameSkipPanel::ApplyConfigToGui( AppConfig& configToApply, int flags ) -{ - const Pcsx2Config::FramerateOptions& appfps( configToApply.EmuOptions.Framerate ); - const Pcsx2Config::GSOptions& gsconf( configToApply.EmuOptions.GS ); - - m_radio_SkipMode->SetSelection( appfps.SkipOnLimit ? 2 : (appfps.SkipOnTurbo ? 1 : 0) ); - - m_spin_FramesToDraw->SetValue( gsconf.FramesToDraw ); - m_spin_FramesToDraw->Enable(!configToApply.EnablePresets); - m_spin_FramesToSkip->SetValue( gsconf.FramesToSkip ); - m_spin_FramesToSkip->Enable(!configToApply.EnablePresets); - - this->Enable(!configToApply.EnablePresets); -} - - -void Panels::FrameSkipPanel::Apply() -{ - Pcsx2Config::FramerateOptions& appfps( g_Conf->EmuOptions.Framerate ); - Pcsx2Config::GSOptions& gsconf( g_Conf->EmuOptions.GS ); - - gsconf.FramesToDraw = m_spin_FramesToDraw->GetValue(); - gsconf.FramesToSkip = m_spin_FramesToSkip->GetValue(); - - switch( m_radio_SkipMode->GetSelection() ) - { - case 0: - appfps.SkipOnLimit = false; - appfps.SkipOnTurbo = false; - gsconf.FrameSkipEnable = false; - break; - - case 1: - appfps.SkipOnLimit = false; - appfps.SkipOnTurbo = true; - //gsconf.FrameSkipEnable = true; - break; - - case 2: - appfps.SkipOnLimit = true; - appfps.SkipOnTurbo = true; - gsconf.FrameSkipEnable = true; - break; - } - - appfps.SanityCheck(); -} - // -------------------------------------------------------------------------------------- // VideoPanel Implementation // -------------------------------------------------------------------------------------- @@ -284,7 +170,6 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : BaseApplicableConfigPanel_SpecificConfig( parent ) { wxPanelWithHelpers* left = new wxPanelWithHelpers( this, wxVERTICAL ); - wxPanelWithHelpers* right = new wxPanelWithHelpers( this, wxVERTICAL ); #ifdef PCSX2_DEVBUILD m_check_SynchronousGS = new pxCheckBox( left, _("Use Synchronized MTGS"), _t("For troubleshooting potential bugs in the MTGS only, as it is potentially very slow.") @@ -294,7 +179,7 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : m_spinner_VsyncQueue = new wxSpinCtrl(left); m_spinner_VsyncQueue->SetRange(0, 3); - m_restore_defaults = new wxButton(right, wxID_DEFAULT, _("Restore Defaults")); + m_restore_defaults = new wxButton(this, wxID_DEFAULT, _("Restore Defaults")); m_spinner_VsyncQueue->SetToolTip( pxEt(L"Setting this to a lower value improves input lag, a value around 2 or 3 will slightly improve framerates. (Default is 2)")); #ifdef PCSX2_DEVBUILD @@ -304,9 +189,6 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : //GSWindowSettingsPanel* winpan = new GSWindowSettingsPanel( left ); //winpan->AddFrame(_("Display/Window")); - m_span = new FrameSkipPanel( right ); - m_span->AddFrame(_("Frame Skipping")); - m_fpan = new FramelimiterPanel( left ); m_fpan->AddFrame(_("Framelimiter")); @@ -315,10 +197,6 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : s_table->AddGrowableCol( 0, 1 ); s_table->AddGrowableCol( 1, 1 ); - *right += m_span | pxExpand; - *right += 5; - *right += m_restore_defaults | StdButton(); - *left += m_fpan | pxExpand; *left += 5; @@ -331,10 +209,12 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : #endif *s_table += left | StdExpand(); - *s_table += right | StdExpand(); *this += s_table | pxExpand; + *this += 12; + *this += m_restore_defaults | StdButton(); + Bind(wxEVT_BUTTON, &VideoPanel::Defaults_Click, this, wxID_DEFAULT); AppStatusEvent_OnSettingsApplied(); } @@ -346,7 +226,6 @@ void Panels::VideoPanel::Defaults_Click(wxCommandEvent& evt) config.EmuOptions.Framerate = Pcsx2Config::FramerateOptions(); VideoPanel::ApplyConfigToGui(config); m_fpan->ApplyConfigToGui(config); - m_span->ApplyConfigToGui(config); evt.Skip(); } @@ -380,7 +259,6 @@ void Panels::VideoPanel::ApplyConfigToGui( AppConfig& configToApply, int flags ) if( flags & AppConfig::APPLY_FLAG_MANUALLY_PROPAGATE ) { - m_span->ApplyConfigToGui( configToApply, true ); m_fpan->ApplyConfigToGui( configToApply, true ); }