|
|
@ -30,6 +30,17 @@ int WINAPI WinMain (HINSTANCE hThisInstance, |
|
|
|
LPSTR lpszArgument, |
|
|
|
int nCmdShow) |
|
|
|
{ |
|
|
|
LPWSTR *szArgList; |
|
|
|
int argCount; |
|
|
|
szArgList = CommandLineToArgvW(GetCommandLine(), &argCount); |
|
|
|
if (szArgList != NULL && argCount >= 1) { |
|
|
|
if (wcscmp(L"single", szArgList[1])==0) { |
|
|
|
doScreenshot(); |
|
|
|
LocalFree(szArgList); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
LocalFree(szArgList); |
|
|
|
|
|
|
|
HWND existingApp = FindWindow(0, szClassName); |
|
|
|
if (existingApp) |
|
|
@ -256,7 +267,7 @@ void doScreenshot() |
|
|
|
WCHAR path[12]; |
|
|
|
getRaspiStorage(path); |
|
|
|
if (wcslen(path) != 3) { |
|
|
|
MessageBox(Hwnd, L"Couldn't find Raspberry USB-Storage\nSaving in current directory!", L"Failure", MB_OK); |
|
|
|
if (Hwnd != NULL) MessageBox(Hwnd, L"Couldn't find Raspberry USB-Storage\nSaving in current directory!", L"Failure", MB_OK); |
|
|
|
CaptureImage(Hwnd, L"screenshot.png"); |
|
|
|
} else { |
|
|
|
WCHAR filename[128]; |
|
|
|