1
1
forked from 0ad/0ad

Do not change the gamma of the display on startup.

Added in df6fceba62 to (most likely) have some control over brightness,
this conflicted with dimming utilities and would not play nice with
starting 0 A.D. in windowed mode.

If gamma handling were to be reintroduced later, it should only affect
the 0 A.D. window.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1976
This was SVN commit r23722.
This commit is contained in:
wraitii 2020-06-01 05:12:51 +00:00
parent 27311ec62e
commit 945ac4fc3b
4 changed files with 3 additions and 21 deletions

View File

@ -44,7 +44,6 @@ Examples:
Configuration:
-conf=KEY:VALUE set a config value
-g=F set the gamma correction to 'F' (default 1.0)
-nosound disable audio
-noUserMod disable loading of the user mod
-shadows enable shadows

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -56,8 +56,6 @@ bool g_PreferGLSL = false;
bool g_PostProc = false;
bool g_SmoothLOS = false;
float g_Gamma = 1.0f;
CStr g_RenderPath = "default";
int g_xres, g_yres;
@ -131,13 +129,6 @@ static void ProcessCommandLineArgs(const CmdLineArgs& args)
}
}
if (args.Has("g"))
{
g_Gamma = args.Get("g").ToFloat();
if (g_Gamma == 0.0f)
g_Gamma = 1.0f;
}
// if (args.Has("listfiles"))
// trace_enable(true);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -78,7 +78,6 @@ extern bool g_PostProc;
// Use smooth LOS interpolation
extern bool g_SmoothLOS;
extern float g_Gamma;
// name of configured render path (depending on OpenGL extensions, this may not be
// the render path that is actually in use right now)
extern CStr g_RenderPath;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -242,13 +242,6 @@ bool CVideoMode::InitSDL()
ogl_Init(); // required after each mode change
// (TODO: does that mean we need to call this when toggling fullscreen later?)
#if !OS_ANDROID
u16 ramp[256];
SDL_CalculateGammaRamp(g_Gamma, ramp);
if (SDL_SetWindowGammaRamp(m_Window, ramp, ramp, ramp) < 0)
LOGWARNING("SDL_SetWindowGammaRamp failed");
#endif
m_IsInitialised = true;
if (!m_ConfigFullscreen)