| 1 |
/* |
| 2 |
* Copyright (C) 2017-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "IGUIRenderSettings.h" |
| 12 |
#include "cores/RetroPlayer/rendering/RenderSettings.h" |
| 13 |
#include "threads/CriticalSection.h" |
| 14 |
#include "utils/Observer.h" |
| 15 |
|
| 16 |
#include <memory> |
| 17 |
|
| 18 |
class CGameSettings; |
| 19 |
|
| 20 |
namespace KODI |
| 21 |
{ |
| 22 |
namespace RETRO |
| 23 |
{ |
| 24 |
class CRPProcessInfo; |
| 25 |
|
| 26 |
class CGUIGameSettings : public IGUIRenderSettings, public Observer |
| 27 |
{ |
| 28 |
public: |
| 29 |
CGUIGameSettings(CRPProcessInfo& processInfo); |
| 30 |
~CGUIGameSettings() override; |
| 31 |
|
| 32 |
// implementation of IGUIRenderSettings |
| 33 |
CRenderSettings GetSettings() const override; |
| 34 |
|
| 35 |
// implementation of Observer |
| 36 |
void Notify(const Observable& obs, const ObservableMessage msg) override; |
| 37 |
|
| 38 |
private: |
| 39 |
void UpdateSettings(); |
| 40 |
|
| 41 |
// Construction parameters |
| 42 |
CRPProcessInfo& m_processInfo; |
| 43 |
|
| 44 |
// GUI parameters |
| 45 |
CGameSettings& m_guiSettings; |
| 46 |
|
| 47 |
// Render parameters |
| 48 |
CRenderSettings m_renderSettings; |
| 49 |
|
| 50 |
// Synchronization parameters |
| 51 |
mutable CCriticalSection m_mutex; |
| 52 |
}; |
| 53 |
} // namespace RETRO |
| 54 |
} // namespace KODI |