File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1452,6 +1452,17 @@ static void saveOptions( void )
14521452 { TheWritableGlobalData->m_displayGamma = gammaval;
14531453 TheDisplay->setGamma (TheGlobalData->m_displayGamma ,0 .0f , 1 .0f , FALSE );
14541454 }
1455+
1456+ // TheSuperHackers @feature bobtista 11/02/2025 Map slider value to GenTool brightness range (-128 to +256)
1457+ // Slider: 0=darkest, 50=neutral, 100=brightest
1458+ // Formula: brightness = (val - 50) * 7.68, clamped to [-128, 256]
1459+ Int brightness = static_cast <Int>((val - 50 ) * 7 .68f );
1460+ if (brightness < -128 ) brightness = -128 ;
1461+ if (brightness > 256 ) brightness = 256 ;
1462+
1463+ // Apply brightness to post-processing filter
1464+ extern void setBrightnessFilterValue (Int value); // Forward declaration
1465+ setBrightnessFilterValue (brightness);
14551466 }
14561467
14571468 // -------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -1512,6 +1512,17 @@ static void saveOptions( void )
15121512 { TheWritableGlobalData->m_displayGamma = gammaval;
15131513 TheDisplay->setGamma (TheGlobalData->m_displayGamma ,0 .0f , 1 .0f , FALSE );
15141514 }
1515+
1516+ // TheSuperHackers @feature bobtista 11/02/2025 Map slider value to GenTool brightness range (-128 to +256)
1517+ // Slider: 0=darkest, 50=neutral, 100=brightest
1518+ // Formula: brightness = (val - 50) * 7.68, clamped to [-128, 256]
1519+ Int brightness = static_cast <Int>((val - 50 ) * 7 .68f );
1520+ if (brightness < -128 ) brightness = -128 ;
1521+ if (brightness > 256 ) brightness = 256 ;
1522+
1523+ // Apply brightness to post-processing filter
1524+ extern void setBrightnessFilterValue (Int value); // Forward declaration
1525+ setBrightnessFilterValue (brightness);
15151526 }
15161527
15171528 // -------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments