mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
BUG-2786 Fixing a startup issue with Windows 7
This commit is contained in:
parent
2330d6af57
commit
99fb245537
1 changed files with 15 additions and 5 deletions
|
@ -517,15 +517,25 @@ namespace Greenshot.Forms
|
|||
new EmailDestination(),
|
||||
new PickerDestination()
|
||||
};
|
||||
|
||||
bool useEditor = true;
|
||||
if (WindowsVersion.IsWindows10OrLater)
|
||||
{
|
||||
int len = 250;
|
||||
var stringBuilder = new StringBuilder(len);
|
||||
using var proc = Process.GetCurrentProcess();
|
||||
var err = Kernel32.GetPackageFullName(proc.Handle, ref len, stringBuilder);
|
||||
if (err != 0)
|
||||
{
|
||||
useEditor = false;
|
||||
}
|
||||
}
|
||||
|
||||
int len = 250;
|
||||
var stringBuilder = new StringBuilder(len);
|
||||
using var proc = Process.GetCurrentProcess();
|
||||
var err = Kernel32.GetPackageFullName(proc.Handle, ref len, stringBuilder);
|
||||
if (err != 0)
|
||||
if (useEditor)
|
||||
{
|
||||
internalDestinations.Add(new EditorDestination());
|
||||
}
|
||||
|
||||
foreach (var internalDestination in internalDestinations)
|
||||
{
|
||||
if (internalDestination.IsActive)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue