| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <memory> |
| 7 |
|
| 8 |
#include "VideoCommon/VideoConfig.h" |
| 9 |
#include "VideoCommon/VideoEvents.h" |
| 10 |
|
| 11 |
class PointerWrap; |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
class WidescreenManager |
| 16 |
{ |
| 17 |
public: |
| 18 |
WidescreenManager(); |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
bool IsGameWidescreen() const { return m_is_game_widescreen; } |
| 23 |
|
| 24 |
void DoState(PointerWrap& p); |
| 25 |
|
| 26 |
private: |
| 27 |
enum class HeuristicState |
| 28 |
{ |
| 29 |
Inactive, |
| 30 |
Active_NotFound, |
| 31 |
Active_Found_Normal, |
| 32 |
Active_Found_Anamorphic, |
| 33 |
}; |
| 34 |
|
| 35 |
|
| 36 |
std::optional<bool> GetWidescreenOverride() const; |
| 37 |
void UpdateWidescreenHeuristic(); |
| 38 |
|
| 39 |
bool m_is_game_widescreen = false; |
| 40 |
bool m_was_orthographically_anamorphic = false; |
| 41 |
HeuristicState m_heuristic_state = HeuristicState::Inactive; |
| 42 |
|
| 43 |
Common::EventHook m_update_widescreen; |
| 44 |
Common::EventHook m_config_changed; |
| 45 |
}; |
| 46 |
|
| 47 |
extern std::unique_ptr<WidescreenManager> g_widescreen; |