mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
cleanup
This commit is contained in:
parent
667cb6b898
commit
6a60cd01fa
|
|
@ -1,10 +1,8 @@
|
|||
#include <windows.h>
|
||||
#include <util/platform.h>
|
||||
#include "advanced-scene-switcher.hpp"
|
||||
//dasoven region_start
|
||||
#include <TlHelp32.h>
|
||||
#include <Psapi.h>
|
||||
//dasoven region_end
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
@ -97,7 +95,6 @@ bool isFullscreen()
|
|||
return false;
|
||||
}
|
||||
|
||||
//dasoven region_start
|
||||
void GetProcessList(QStringList &processes) {
|
||||
|
||||
HANDLE procSnapshot;
|
||||
|
|
@ -140,7 +137,6 @@ bool isInFocus(const QString &exeToCheck) {
|
|||
|
||||
return exeToCheck == QString::fromWCharArray(executablePath).split(QRegExp("(/|\\\\)")).back();
|
||||
}
|
||||
//dasoven region_end
|
||||
|
||||
int getLastInputTime()
|
||||
{
|
||||
|
|
@ -156,15 +152,7 @@ int getTime()
|
|||
return GetTickCount();
|
||||
}
|
||||
|
||||
bool SS()
|
||||
int secondsSinceLastInput()
|
||||
{
|
||||
bool time = false;
|
||||
if(SystemParametersInfo(
|
||||
SPI_GETSCREENSAVEACTIVE,
|
||||
NULL,
|
||||
&time,
|
||||
NULL
|
||||
));
|
||||
|
||||
return time;
|
||||
}
|
||||
return (getTime() - getLastInputTime()) / 1000;
|
||||
}
|
||||
|
|
@ -2643,7 +2643,7 @@ void SwitcherData::Thread()
|
|||
}
|
||||
}
|
||||
|
||||
if (!ignoreIdle && getTime() - getLastInputTime() > idleData.time * 1000)
|
||||
if (!ignoreIdle && secondsSinceLastInput() > idleData.time)
|
||||
{
|
||||
scene = idleData.scene;
|
||||
transition = idleData.transition;
|
||||
|
|
|
|||
|
|
@ -111,8 +111,7 @@ void GetWindowList(std::vector<std::string> &windows);
|
|||
void GetCurrentWindowTitle(std::string &title);
|
||||
std::pair<int, int> getCursorPos();
|
||||
bool isFullscreen();
|
||||
int getLastInputTime();
|
||||
int getTime();
|
||||
int secondsSinceLastInput();
|
||||
|
||||
bool isInFocus(const QString &exeToCheck);
|
||||
void GetProcessList(QStringList &processes);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user