Rename members of DrawingEngine

This commit is contained in:
Gymnasiast committed 2026-08-07 06:57:33 +02:00
1 parent 687fa7181d
commit e103cb11bb
8 files changed
+17 -17

No files matched your search

+1 -1
View File
@@ -810,7 +810,7 @@ private:
// Create window in window first rather than fullscreen so we have the display the window is on first
uint32_t flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI;
if (Config::Get().general.drawingEngine == DrawingEngine::OpenGL)
if (Config::Get().general.drawingEngine == DrawingEngine::openGL)
{
flags |= SDL_WINDOW_OPENGL;
}
@@ -29,10 +29,10 @@ namespace OpenRCT2::Ui
{
switch (type)
{
case DrawingEngine::SoftwareWithHardwareDisplay:
case DrawingEngine::softwareWithHardwareDisplay:
return CreateHardwareDisplayDrawingEngine(uiContext);
#ifndef DISABLE_OPENGL
case DrawingEngine::OpenGL:
case DrawingEngine::openGL:
return CreateOpenGLDrawingEngine(uiContext);
#endif
default:
+1 -1
View File
@@ -1146,7 +1146,7 @@ namespace OpenRCT2::Ui::Windows
setCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, Config::Get().general.enableLightFx);
const bool lightFxEnabled = Config::Get().general.dayNightCycle
&& Config::Get().general.drawingEngine == DrawingEngine::SoftwareWithHardwareDisplay;
&& Config::Get().general.drawingEngine == DrawingEngine::softwareWithHardwareDisplay;
setWidgetDisabled(WIDX_ENABLE_LIGHT_FX_CHECKBOX, !lightFxEnabled);
if (!lightFxEnabled)
Config::Get().general.enableLightFx = false;
+3 -3
View File
@@ -128,7 +128,7 @@ namespace OpenRCT2
Network::NetworkBase _network;
#endif
DrawingEngine _drawingEngineType = DrawingEngine::SoftwareWithHardwareDisplay;
DrawingEngine _drawingEngineType = DrawingEngine::softwareWithHardwareDisplay;
std::unique_ptr<Drawing::IDrawingEngine> _drawingEngine;
std::unique_ptr<Paint::Painter> _painter;
@@ -606,9 +606,9 @@ namespace OpenRCT2
else
{
// If the drawing engine creation failed, try to create a software engine.
if (drawingEngineType == DrawingEngine::OpenGL)
if (drawingEngineType == DrawingEngine::openGL)
{
drawingEngineType = DrawingEngine::SoftwareWithHardwareDisplay;
drawingEngineType = DrawingEngine::softwareWithHardwareDisplay;
LOG_ERROR("Trying fallback back to software...");
drawingEngine = initializeEngine(drawingEngineType);
+4 -4
View File
@@ -108,8 +108,8 @@ namespace OpenRCT2::Config
});
static const auto Enum_DrawingEngine = ConfigEnum<DrawingEngine>({
ConfigEnumEntry<DrawingEngine>("SOFTWARE_HWD", DrawingEngine::SoftwareWithHardwareDisplay),
ConfigEnumEntry<DrawingEngine>("OPENGL", DrawingEngine::OpenGL),
ConfigEnumEntry<DrawingEngine>("SOFTWARE_HWD", DrawingEngine::softwareWithHardwareDisplay),
ConfigEnumEntry<DrawingEngine>("OPENGL", DrawingEngine::openGL),
});
static const auto Enum_Temperature = ConfigEnum<TemperatureUnit>({
@@ -213,7 +213,7 @@ namespace OpenRCT2::Config
model->windowWidth = reader->GetInt32("window_width", -1);
model->defaultDisplay = reader->GetInt32("default_display", 0);
model->drawingEngine = reader->GetEnum<DrawingEngine>(
"drawing_engine", DrawingEngine::SoftwareWithHardwareDisplay, Enum_DrawingEngine);
"drawing_engine", DrawingEngine::softwareWithHardwareDisplay, Enum_DrawingEngine);
model->uncapFPS = reader->GetBoolean("uncap_fps", false);
model->useVSync = reader->GetBoolean("use_vsync", true);
model->virtualFloorStyle = reader->GetEnum<VirtualFloorStyles>(
@@ -232,7 +232,7 @@ namespace OpenRCT2::Config
// Default config setting is false until the games canvas can be separated from the effect
model->dayNightCycle = reader->GetBoolean("day_night_cycle", false);
const bool supportsLightFx = model->drawingEngine == DrawingEngine::SoftwareWithHardwareDisplay;
const bool supportsLightFx = model->drawingEngine == DrawingEngine::softwareWithHardwareDisplay;
model->enableLightFx = supportsLightFx && reader->GetBoolean("enable_light_fx", false);
model->enableLightFxForVehicles = supportsLightFx && reader->GetBoolean("enable_light_fx_for_vehicles", false);
model->upperCaseBanners = reader->GetBoolean("upper_case_banners", false);
+4 -4
View File
@@ -18,10 +18,10 @@
enum class DrawingEngine : int32_t
{
None = -1,
SoftwareWithHardwareDisplay,
OpenGL,
Count,
none = -1,
softwareWithHardwareDisplay,
openGL,
count,
};
enum DrawingEngineFlag
+1 -1
View File
@@ -46,7 +46,7 @@ static IDrawingEngine* GetDrawingEngine()
bool DrawingEngineRequiresNewWindow(DrawingEngine srcEngine, DrawingEngine dstEngine)
{
bool openGL = srcEngine == DrawingEngine::OpenGL || dstEngine == DrawingEngine::OpenGL;
bool openGL = srcEngine == DrawingEngine::openGL || dstEngine == DrawingEngine::openGL;
return Platform::RequireNewWindow(openGL);
}
+1 -1
View File
@@ -216,7 +216,7 @@ static bool OnCrash(
// 1. Create the screenshot with software renderer - requires allocations
// 2. Not create screenshot at all.
// Discovering which of the approaches got implemented is left as an excercise for the reader.
if (OpenRCT2::GetContext()->GetDrawingEngineType() != DrawingEngine::OpenGL)
if (OpenRCT2::GetContext()->GetDrawingEngineType() != DrawingEngine::openGL)
{
std::string screenshotPath = ScreenshotDump();
if (!screenshotPath.empty())