xbmc
GUIRenderSettings.h
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 "cores/GameSettings.h"
12 #include "cores/RetroPlayer/guibridge/IGUIRenderSettings.h"
13 #include "cores/RetroPlayer/rendering/RenderSettings.h"
14 #include "threads/CriticalSection.h"
15 #include "utils/Geometry.h"
16 
17 namespace KODI
18 {
19 namespace RETRO
20 {
21 class CGUIGameControl;
22 
24 {
25 public:
27  ~CGUIRenderSettings() override = default;
28 
29  // implementation of IGUIRenderSettings
30  bool HasVideoFilter() const override;
31  bool HasStretchMode() const override;
32  bool HasRotation() const override;
33  bool HasPixels() const override;
34  CRenderSettings GetSettings() const override;
35  CRect GetDimensions() const override;
36 
37  // Render functions
38  void Reset();
39  void SetSettings(const CRenderSettings& settings);
40  void SetDimensions(const CRect& dimensions);
41  void SetVideoFilter(const std::string& videoFilter);
42  void SetStretchMode(STRETCHMODE stretchMode);
43  void SetRotationDegCCW(unsigned int rotationDegCCW);
44  void SetPixels(const std::string& pixelPath);
45 
46 private:
47  // Construction parameters
48  CGUIGameControl& m_guiControl;
49 
50  // Render parameters
51  CRenderSettings m_renderSettings;
52  CRect m_renderDimensions;
53 
54  // Synchronization parameters
55  mutable CCriticalSection m_mutex;
56 };
57 } // namespace RETRO
58 } // namespace KODI
Interface to pass render settings from the GUI to the renderer.
Definition: IGUIRenderSettings.h:21
Definition: GUIGameControl.h:29
CRenderSettings GetSettings() const override
Get the settings used to render this target.
Definition: GUIRenderSettings.cpp:42
bool HasVideoFilter() const override
Returns true if this render target has a video filter set.
Definition: GUIRenderSettings.cpp:22
bool HasStretchMode() const override
Returns true if this render target has a stretch mode set.
Definition: GUIRenderSettings.cpp:27
Definition: GUIRenderSettings.h:23
CRect GetDimensions() const override
Get the dimensions of this target.
Definition: GUIRenderSettings.cpp:49
Definition: AudioDecoder.h:18
STRETCHMODE
Methods for stretching the game to the viewing area.
Definition: GameSettings.h:29
Definition: settings.py:1
bool HasRotation() const override
Returns true if this render target has a video rotation set.
Definition: GUIRenderSettings.cpp:32
bool HasPixels() const override
Returns true if this render target has a path to a savestate for showing pixel data.
Definition: GUIRenderSettings.cpp:37
Definition: RenderSettings.h:17