mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-23 23:21:49 +01:00
Split flash duration into segments.
Needed to reduce CPU usage while flashing is active
This commit is contained in:
parent
98c1a9ff41
commit
ac4e940605
@ -123,7 +123,8 @@ namespace DS4Windows
|
||||
{
|
||||
if (elapsed < PULSE_FLASH_DURATION)
|
||||
{
|
||||
ratio = 100.0 * (elapsed / (double)PULSE_FLASH_DURATION);
|
||||
elapsed = elapsed / 40;
|
||||
ratio = 100.0 * (elapsed / ((double)PULSE_FLASH_DURATION * 0.025));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -135,7 +136,8 @@ namespace DS4Windows
|
||||
{
|
||||
if (elapsed < PULSE_FLASH_DURATION)
|
||||
{
|
||||
ratio = (0 - 100.0) * (elapsed / (double)PULSE_FLASH_DURATION) + 100.0;
|
||||
elapsed = elapsed / 40;
|
||||
ratio = (0 - 100.0) * (elapsed / ((double)PULSE_FLASH_DURATION * 0.025)) + 100.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user