mirror of https://github.com/AxioDL/metaforce.git
Add fullscreen CVar
This commit is contained in:
parent
97fd035f29
commit
0e0c7139d7
|
@ -21,6 +21,7 @@ using namespace std::literals;
|
||||||
|
|
||||||
struct CVarCommons {
|
struct CVarCommons {
|
||||||
CVarManager& m_mgr;
|
CVarManager& m_mgr;
|
||||||
|
CVar* m_fullscreen = nullptr;
|
||||||
CVar* m_graphicsApi = nullptr;
|
CVar* m_graphicsApi = nullptr;
|
||||||
CVar* m_drawSamples = nullptr;
|
CVar* m_drawSamples = nullptr;
|
||||||
CVar* m_texAnisotropy = nullptr;
|
CVar* m_texAnisotropy = nullptr;
|
||||||
|
@ -45,6 +46,10 @@ struct CVarCommons {
|
||||||
|
|
||||||
CVarCommons(CVarManager& manager);
|
CVarCommons(CVarManager& manager);
|
||||||
|
|
||||||
|
bool getFullscreen() const { return m_fullscreen->toBoolean(); }
|
||||||
|
|
||||||
|
void setFullscreen(bool b) { m_fullscreen->fromBoolean(b); }
|
||||||
|
|
||||||
std::string getGraphicsApi() const { return m_graphicsApi->toLiteral(); }
|
std::string getGraphicsApi() const { return m_graphicsApi->toLiteral(); }
|
||||||
|
|
||||||
void setGraphicsApi(std::string_view api) { m_graphicsApi->fromLiteral(api); }
|
void setGraphicsApi(std::string_view api) { m_graphicsApi->fromLiteral(api); }
|
||||||
|
|
|
@ -7,6 +7,8 @@ CVarCommons* m_instance = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVarCommons::CVarCommons(CVarManager& manager) : m_mgr(manager) {
|
CVarCommons::CVarCommons(CVarManager& manager) : m_mgr(manager) {
|
||||||
|
m_fullscreen = m_mgr.findOrMakeCVar("fullscreen"sv, "Start in fullscreen"sv, false,
|
||||||
|
hecl::CVar::EFlags::System | hecl::CVar::EFlags::Archive);
|
||||||
m_graphicsApi = m_mgr.findOrMakeCVar("graphicsApi"sv, "API to use for rendering graphics"sv, DEFAULT_GRAPHICS_API,
|
m_graphicsApi = m_mgr.findOrMakeCVar("graphicsApi"sv, "API to use for rendering graphics"sv, DEFAULT_GRAPHICS_API,
|
||||||
hecl::CVar::EFlags::System | hecl::CVar::EFlags::Archive |
|
hecl::CVar::EFlags::System | hecl::CVar::EFlags::Archive |
|
||||||
hecl::CVar::EFlags::ModifyRestart);
|
hecl::CVar::EFlags::ModifyRestart);
|
||||||
|
|
Loading…
Reference in New Issue