|
|
@ -255,8 +255,16 @@ void doScreenshot() |
|
|
|
{ |
|
|
|
WCHAR path[12]; |
|
|
|
getRaspiStorage(path); |
|
|
|
MessageBox(Hwnd, path, L"Storage path", MB_OK); |
|
|
|
CaptureImage(Hwnd, L"file.bmp"); |
|
|
|
if (wcslen(path) != 3) { |
|
|
|
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]; |
|
|
|
wcsncpy(filename, path, sizeof(filename)); |
|
|
|
wcsncpy(filename, L"screenshot.png", sizeof(filename)); |
|
|
|
CaptureImage(Hwnd, filename); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void InitNotifyIconData() |
|
|
@ -274,9 +282,7 @@ void InitNotifyIconData() |
|
|
|
|
|
|
|
|
|
|
|
void getRaspiStorage(LPWSTR out) { |
|
|
|
// GetLogicalDrives()
|
|
|
|
// for result
|
|
|
|
// if result.GetDriveType() == DRIVE_REMOVABLE
|
|
|
|
out[0] = L'\0'; out[1] = L'\0'; |
|
|
|
|
|
|
|
WCHAR myDrives[105]; |
|
|
|
WCHAR volumeName[MAX_PATH]; |
|
|
@ -300,7 +306,7 @@ void getRaspiStorage(LPWSTR out) { |
|
|
|
{ |
|
|
|
if (GetVolumeInformationW(drive, volumeName, ARRAYSIZE(volumeName), &serialNumber, &maxComponentLen, &fileSystemFlags, fileSystemName, ARRAYSIZE(fileSystemName))) |
|
|
|
{ |
|
|
|
if (wcscmp(volumeName, L"SCREENSHOTS")) { |
|
|
|
if (wcscmp(L"SCREENSHOTS", volumeName)==0) { // ToDo
|
|
|
|
wcsncpy(out, drive, sizeof(out)); |
|
|
|
} |
|
|
|
} |
|
|
|