#pragma once
/*
* Copyright (C) 2013 Team XBMC
- * http://www.xbmc.org
+ * http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
*/
+#include <map>
#include <set>
#include <vector>
#include "guilib/Resolution.h"
-#include "settings/ISettingCallback.h"
-#include "settings/ISubSettings.h"
+#include "settings/lib/ISettingCallback.h"
+#include "settings/lib/ISubSettings.h"
#include "threads/CriticalSection.h"
#include "utils/Observer.h"
static void SettingOptionsResolutionsFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t);
static void SettingOptionsScreensFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t);
static void SettingOptionsVerticalSyncsFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t);
+ static void SettingOptionsStereoscopicModesFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t);
+ static void SettingOptionsPreferredStereoscopicViewModesFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t);
protected:
CDisplaySettings();
CDisplaySettings(const CDisplaySettings&);
- CDisplaySettings const& operator=(CDisplaySettings const&);
+ CDisplaySettings& operator=(CDisplaySettings const&);
virtual ~CDisplaySettings();
DisplayMode GetCurrentDisplayMode() const;
static std::string GetStringFromResolution(RESOLUTION resolution, float refreshrate = 0.0f);
static RESOLUTION GetResolutionForScreen();
+ static RESOLUTION FindBestMatchingResolution(const std::map<RESOLUTION, RESOLUTION_INFO> &resolutionInfos, int screen, int width, int height, float refreshrate, unsigned int flags);
+
private:
// holds the real gui resolution
RESOLUTION m_currentResolution;
float m_verticalShift; // current vertical shift
bool m_nonLinearStretched; // current non-linear stretch
- /*!
- \brief A set of pairs consisting of a setting identifier
- and a boolean value which should be ignored in specific
- situations. If the boolean value is "true" the whole
- OnSettingChanging() logic must be skipped once. If it
- is "false" only showing the GUI dialog must be skipped.
- */
- std::set< std::pair<std::string, bool> > m_ignoreSettingChanging;
+ bool m_resolutionChangeAborted;
CCriticalSection m_critical;
};