Skip to content

Commit

Permalink
changed: avoid including Autorun.h all over xbmc
Browse files Browse the repository at this point in the history
  • Loading branch information
elupus committed Dec 28, 2011
1 parent 90c88c1 commit 825175e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,12 @@ CApplication::CApplication(void) : m_itemCurrentFile(new CFileItem), m_progressT
m_bEnableLegacyRes = false;
m_bSystemScreenSaverEnable = false;
m_pInertialScrollingHandler = new CInertialScrollingHandler();
m_Autorun = new CAutorun();
}

CApplication::~CApplication(void)
{
delete m_Autorun;
delete m_currentStack;

#ifdef HAS_KARAOKE
Expand Down Expand Up @@ -4794,7 +4796,7 @@ void CApplication::ProcessSlow()
#ifdef HAS_DVD_DRIVE
// checks whats in the DVD drive and tries to autostart the content (xbox games, dvd, cdda, avi files...)
if (!IsPlayingVideo())
m_Autorun.HandleAutorun();
m_Autorun->HandleAutorun();
#endif

// update upnp server/renderer states
Expand Down
8 changes: 6 additions & 2 deletions xbmc/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ namespace ADDON
typedef boost::shared_ptr<IAddon> AddonPtr;
}

namespace MEDIA_DETECT
{
class CAutorun;
}

#include "cores/IPlayer.h"
#include "cores/playercorefactory/PlayerCoreFactory.h"
#include "PlayListPlayer.h"
Expand All @@ -47,7 +52,6 @@ namespace ADDON
#ifdef _WIN32
#include "win32/WIN32Util.h"
#endif
#include "Autorun.h"
#include "video/Bookmark.h"
#include "utils/Stopwatch.h"
#include "ApplicationMessenger.h"
Expand Down Expand Up @@ -211,7 +215,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs
#endif

#ifdef HAS_DVD_DRIVE
MEDIA_DETECT::CAutorun m_Autorun;
MEDIA_DETECT::CAutorun* m_Autorun;
#endif

#if !defined(_WIN32) && defined(HAS_DVD_DRIVE)
Expand Down
1 change: 1 addition & 0 deletions xbmc/music/windows/GUIWindowMusicSongs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "guilib/LocalizeStrings.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
#include "Autorun.h"

#define CONTROL_BTNVIEWASICONS 2
#define CONTROL_BTNSORTBY 3
Expand Down
1 change: 1 addition & 0 deletions xbmc/pictures/GUIWindowPictures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "utils/TimeUtils.h"
#include "utils/log.h"
#include "utils/URIUtils.h"
#include "Autorun.h"

#define CONTROL_BTNVIEWASICONS 2
#define CONTROL_BTNSORTBY 3
Expand Down
1 change: 1 addition & 0 deletions xbmc/video/windows/GUIWindowVideoBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "GUIUserMessages.h"
#include "addons/Skin.h"
#include "storage/MediaManager.h"
#include "Autorun.h"

using namespace std;
using namespace XFILE;
Expand Down
1 change: 1 addition & 0 deletions xbmc/windows/GUIWindowFileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "utils/FileOperationJob.h"
#include "utils/FileUtils.h"
#include "utils/URIUtils.h"
#include "Autorun.h"

using namespace std;
using namespace XFILE;
Expand Down

0 comments on commit 825175e

Please sign in to comment.