- backported some fixes in the common backend from GZDoom

This commit is contained in:
Christoph Oelckers 2021-08-03 13:00:09 +02:00
parent 17b2154e9a
commit 888f8888bb
3 changed files with 4 additions and 4 deletions

View file

@ -859,7 +859,7 @@ void S_StopMusic (bool force)
CCMD (changemus)
{
if (!nomusic)
if (MusicEnabled())
{
if (argv.argc() > 1)
{

View file

@ -681,13 +681,13 @@ void V_ApplyLuminosityTranslation(int translation, uint8_t* pixel, int size)
int index = clamp(lumadjust, 0, 255);
PalEntry newcol = remap[index];
// extend the range if we find colors outside what initial analysis provided.
if (gray < lum_min)
if (gray < lum_min && lum_min != 0)
{
newcol.r = newcol.r * gray / lum_min;
newcol.g = newcol.g * gray / lum_min;
newcol.b = newcol.b * gray / lum_min;
}
else if (gray > lum_max)
else if (gray > lum_max && lum_max != 0)
{
newcol.r = clamp(newcol.r * gray / lum_max, 0, 255);
newcol.g = clamp(newcol.g * gray / lum_max, 0, 255);

View file

@ -90,7 +90,7 @@ void Mac_I_FatalError(const char* errortext);
void Unix_I_FatalError(const char* errortext)
{
// Close window or exit fullscreen and release mouse capture
SDL_Quit();
SDL_QuitSubSystem(SDL_INIT_VIDEO);
const char *str;
if((str=getenv("KDE_FULL_SESSION")) && strcmp(str, "true") == 0)