mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Use Environment.Is64BitOperatingSystem
This commit is contained in:
parent
4326987100
commit
4abac3d383
4 changed files with 3 additions and 23 deletions
|
@ -488,26 +488,6 @@ public static string decode_mmioFOURCC(int code)
|
|||
return new string(chs);
|
||||
}
|
||||
|
||||
public static bool Is64Bit()
|
||||
{
|
||||
#if MicrosoftStore
|
||||
return true;
|
||||
#else
|
||||
return IntPtr.Size == 8 || (IntPtr.Size == 4 && Is32BitProcessOn64BitProcessor());
|
||||
#endif
|
||||
}
|
||||
|
||||
public static bool Is32Bit()
|
||||
{
|
||||
return !Is64Bit();
|
||||
}
|
||||
|
||||
private static bool Is32BitProcessOn64BitProcessor()
|
||||
{
|
||||
IsWow64Process(Process.GetCurrentProcess().Handle, out bool retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public static bool FlashWindowEx(Form frm, uint flashCount = uint.MaxValue)
|
||||
{
|
||||
FLASHWINFO fInfo = new FLASHWINFO();
|
||||
|
|
|
@ -33,7 +33,7 @@ public class FFmpegUpdateChecker : GitHubUpdateChecker
|
|||
|
||||
public FFmpegUpdateChecker(string owner, string repo) : base(owner, repo)
|
||||
{
|
||||
if (NativeMethods.Is64Bit())
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
Architecture = FFmpegArchitecture.win64;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public static DialogResult DownloadFFmpeg(bool async, DownloaderForm.DownloaderI
|
|||
{
|
||||
string url;
|
||||
|
||||
if (NativeMethods.Is64Bit())
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
url = "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip";
|
||||
}
|
||||
|
|
|
@ -1422,7 +1422,7 @@ public static void ToggleHotkeys(bool disableHotkeys)
|
|||
|
||||
public static bool CheckFFmpeg(TaskSettings taskSettings)
|
||||
{
|
||||
if (NativeMethods.Is32Bit() && !taskSettings.CaptureSettings.FFmpegOptions.OverrideCLIPath)
|
||||
if (!Environment.Is64BitOperatingSystem && !taskSettings.CaptureSettings.FFmpegOptions.OverrideCLIPath)
|
||||
{
|
||||
// TODO: Translate
|
||||
MessageBox.Show("FFmpeg that comes with ShareX only supports 64-bit operating systems.",
|
||||
|
|
Loading…
Reference in a new issue