mirror of https://github.com/PCSX2/pcsx2.git
console: Remove scrollbar mouse drag pause behaviour
If the dev/verbose logging option is enabled and the game requires automatic gamefixes, the console log will always scroll to the bottom when the scrollbar is released since a new log message will be output when emulation unpauses. This could be quite annoying when checking a log while the game is running. The behaviour doesn't seem to be all that useful anymore (previously it was useful to work around a GUI bug where the automatic gamefixes/widescreen patches/cheats menu options didn't apply immediately) and only works on Windows, so let's remove it.
This commit is contained in:
parent
765b68458a
commit
f338ffea74
|
@ -300,7 +300,6 @@ set(pcsx2GuiSources
|
|||
gui/Panels/PluginSelectorPanel.cpp
|
||||
gui/Panels/SpeedhacksPanel.cpp
|
||||
gui/Panels/VideoPanel.cpp
|
||||
gui/pxLogTextCtrl.cpp
|
||||
gui/RecentIsoList.cpp
|
||||
gui/Saveslots.cpp
|
||||
gui/SysState.cpp
|
||||
|
|
|
@ -346,7 +346,8 @@ void ConLog_LoadSaveSettings( IniInterface& ini )
|
|||
ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, AppConfig::ConsoleLogOptions& options )
|
||||
: wxFrame(parent, wxID_ANY, title)
|
||||
, m_conf( options )
|
||||
, m_TextCtrl( *new pxLogTextCtrl(this) )
|
||||
, m_TextCtrl( *new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2 | wxTE_NOHIDESEL) )
|
||||
, m_timer_FlushUnlocker( this )
|
||||
, m_ColorTable( options.FontSize )
|
||||
|
||||
|
|
|
@ -84,27 +84,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// pxLogTextCtrl
|
||||
// --------------------------------------------------------------------------------------
|
||||
class pxLogTextCtrl : public wxTextCtrl
|
||||
{
|
||||
protected:
|
||||
std::unique_ptr<ScopedCoreThreadPause> m_IsPaused;
|
||||
|
||||
public:
|
||||
pxLogTextCtrl(wxWindow* parent);
|
||||
virtual ~pxLogTextCtrl() throw();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
virtual void WriteText(const wxString& text);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void OnThumbTrack(wxScrollWinEvent& event);
|
||||
virtual void OnThumbRelease(wxScrollWinEvent& event);
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ConsoleLogFrame -- Because the one built in wx is poop.
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -151,7 +130,7 @@ protected:
|
|||
|
||||
protected:
|
||||
ConLogConfig& m_conf;
|
||||
pxLogTextCtrl& m_TextCtrl;
|
||||
wxTextCtrl& m_TextCtrl;
|
||||
wxTimer m_timer_FlushLimiter;
|
||||
wxTimer m_timer_FlushUnlocker;
|
||||
ColorArray m_ColorTable;
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "App.h"
|
||||
#include "ConsoleLogger.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
pxLogTextCtrl::pxLogTextCtrl( wxWindow* parent )
|
||||
: wxTextCtrl( parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2 | wxTE_NOHIDESEL
|
||||
)
|
||||
{
|
||||
Bind(wxEVT_SCROLLWIN_THUMBTRACK, &pxLogTextCtrl::OnThumbTrack, this);
|
||||
Bind(wxEVT_SCROLLWIN_THUMBRELEASE, &pxLogTextCtrl::OnThumbRelease, this);
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void pxLogTextCtrl::WriteText(const wxString& text)
|
||||
{
|
||||
// Don't need the update message -- saves some overhead.
|
||||
DoWriteText( text, SetValue_SelectionOnly );
|
||||
}
|
||||
#endif
|
||||
|
||||
void pxLogTextCtrl::OnThumbTrack(wxScrollWinEvent& evt)
|
||||
{
|
||||
//Console.Warning( "Thumb Tracking!!!" );
|
||||
if( !m_IsPaused )
|
||||
m_IsPaused = std::unique_ptr<ScopedCoreThreadPause>(new ScopedCoreThreadPause());
|
||||
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void pxLogTextCtrl::OnThumbRelease(wxScrollWinEvent& evt)
|
||||
{
|
||||
//Console.Warning( "Thumb Releasing!!!" );
|
||||
if( m_IsPaused )
|
||||
{
|
||||
m_IsPaused->AllowResume();
|
||||
m_IsPaused = nullptr;
|
||||
}
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
pxLogTextCtrl::~pxLogTextCtrl() throw()
|
||||
{
|
||||
}
|
|
@ -366,7 +366,6 @@
|
|||
<ClCompile Include="..\..\gui\MemoryCardFolder.cpp" />
|
||||
<ClCompile Include="..\..\gui\MessageBoxes.cpp" />
|
||||
<ClCompile Include="..\..\gui\MSWstuff.cpp" />
|
||||
<ClCompile Include="..\..\gui\pxLogTextCtrl.cpp" />
|
||||
<ClCompile Include="..\..\gui\RecentIsoList.cpp" />
|
||||
<ClCompile Include="..\..\gui\UpdateUI.cpp" />
|
||||
<ClCompile Include="..\..\gui\Dialogs\AboutBoxDialog.cpp" />
|
||||
|
|
|
@ -641,9 +641,6 @@
|
|||
<ClCompile Include="..\..\gui\MSWstuff.cpp">
|
||||
<Filter>AppHost</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\gui\pxLogTextCtrl.cpp">
|
||||
<Filter>AppHost</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\gui\RecentIsoList.cpp">
|
||||
<Filter>AppHost</Filter>
|
||||
</ClCompile>
|
||||
|
|
Loading…
Reference in New Issue