mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 11:30:44 +00:00
- backported some fixes in the common backend from GZDoom
This commit is contained in:
parent
17b2154e9a
commit
888f8888bb
3 changed files with 4 additions and 4 deletions
|
@ -859,7 +859,7 @@ void S_StopMusic (bool force)
|
||||||
|
|
||||||
CCMD (changemus)
|
CCMD (changemus)
|
||||||
{
|
{
|
||||||
if (!nomusic)
|
if (MusicEnabled())
|
||||||
{
|
{
|
||||||
if (argv.argc() > 1)
|
if (argv.argc() > 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -681,13 +681,13 @@ void V_ApplyLuminosityTranslation(int translation, uint8_t* pixel, int size)
|
||||||
int index = clamp(lumadjust, 0, 255);
|
int index = clamp(lumadjust, 0, 255);
|
||||||
PalEntry newcol = remap[index];
|
PalEntry newcol = remap[index];
|
||||||
// extend the range if we find colors outside what initial analysis provided.
|
// 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.r = newcol.r * gray / lum_min;
|
||||||
newcol.g = newcol.g * gray / lum_min;
|
newcol.g = newcol.g * gray / lum_min;
|
||||||
newcol.b = newcol.b * 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.r = clamp(newcol.r * gray / lum_max, 0, 255);
|
||||||
newcol.g = clamp(newcol.g * gray / lum_max, 0, 255);
|
newcol.g = clamp(newcol.g * gray / lum_max, 0, 255);
|
||||||
|
|
|
@ -90,7 +90,7 @@ void Mac_I_FatalError(const char* errortext);
|
||||||
void Unix_I_FatalError(const char* errortext)
|
void Unix_I_FatalError(const char* errortext)
|
||||||
{
|
{
|
||||||
// Close window or exit fullscreen and release mouse capture
|
// Close window or exit fullscreen and release mouse capture
|
||||||
SDL_Quit();
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
|
|
||||||
const char *str;
|
const char *str;
|
||||||
if((str=getenv("KDE_FULL_SESSION")) && strcmp(str, "true") == 0)
|
if((str=getenv("KDE_FULL_SESSION")) && strcmp(str, "true") == 0)
|
||||||
|
|
Loading…
Reference in a new issue