shithub: candycrisis

Download patch

ref: 0ebaec5b10dde1aeae494a3afbeb633462f9ded3
parent: ca955c83642c7c7944c022b28ed84fb4daba75b3
author: Iliyas Jorio <[email protected]>
date: Wed Aug 5 16:22:51 EDT 2020

Enable fade in/out in fullscreen mode

--- a/src/SDLU.cpp
+++ b/src/SDLU.cpp
@@ -32,6 +32,7 @@
 static MBoolean     s_isForeground = true;
 
 extern MBoolean  widescreen;
+extern MBoolean  fullscreen;
  
 // for checktyping
 struct BufferedKey
@@ -300,7 +301,10 @@
 
 void SDLU_SetBrightness( float b )
 {
-/*	Uint16 table[256];
+    if (!fullscreen)
+        return;
+
+	Uint16 table[256];
 	int    index;
 	
 	for( index=0; index<256; index++ )
@@ -309,7 +313,7 @@
 	}
 	
 	SDL_SetWindowGammaRamp(g_window, table, table, table);
-*/}
+}
 
 void SDLU_Yield()
 {
binary files a/src/main.cpp b/src/main.cpp differ