mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Upgrade WX to r74856, mainly to support @2x.
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
// Purpose: File system watcher impl classes
|
||||
// Author: Bartosz Bekier
|
||||
// Created: 2009-05-26
|
||||
// RCS-ID: $Id: fswatcher.h 70796 2012-03-04 00:29:31Z VZ $
|
||||
// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -49,8 +48,13 @@ public:
|
||||
|
||||
virtual bool Add(const wxFSWatchInfo& winfo)
|
||||
{
|
||||
wxCHECK_MSG( m_watches.find(winfo.GetPath()) == m_watches.end(), false,
|
||||
"Path '%s' is already watched");
|
||||
if ( m_watches.find(winfo.GetPath()) != m_watches.end() )
|
||||
{
|
||||
wxLogTrace(wxTRACE_FSWATCHER,
|
||||
"Path '%s' is already watched", winfo.GetPath());
|
||||
// This can happen if a dir is watched, then a parent tree added
|
||||
return true;
|
||||
}
|
||||
|
||||
// construct watch entry
|
||||
wxSharedPtr<wxFSWatchEntry> watch(new wxFSWatchEntry(winfo));
|
||||
@ -66,8 +70,13 @@ public:
|
||||
virtual bool Remove(const wxFSWatchInfo& winfo)
|
||||
{
|
||||
wxFSWatchEntries::iterator it = m_watches.find(winfo.GetPath());
|
||||
wxCHECK_MSG( it != m_watches.end(), false, "Path '%s' is not watched");
|
||||
|
||||
if ( it == m_watches.end() )
|
||||
{
|
||||
wxLogTrace(wxTRACE_FSWATCHER,
|
||||
"Path '%s' is not watched", winfo.GetPath());
|
||||
// This can happen if a dir is watched, then a parent tree added
|
||||
return true;
|
||||
}
|
||||
wxSharedPtr<wxFSWatchEntry> watch = it->second;
|
||||
m_watches.erase(it);
|
||||
return DoRemove(watch);
|
||||
@ -79,6 +88,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check whether any filespec matches the file's ext (if present)
|
||||
bool MatchesFilespec(const wxFileName& fn, const wxString& filespec) const
|
||||
{
|
||||
return filespec.empty() || wxMatchWild(filespec, fn.GetFullName());
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool DoAdd(wxSharedPtr<wxFSWatchEntry> watch) = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user