diff --git a/ShareX.HelpersLib/Native/NativeMethods_Helpers.cs b/ShareX.HelpersLib/Native/NativeMethods_Helpers.cs index 276c30570..fd9a34fd5 100644 --- a/ShareX.HelpersLib/Native/NativeMethods_Helpers.cs +++ b/ShareX.HelpersLib/Native/NativeMethods_Helpers.cs @@ -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(); diff --git a/ShareX.HelpersLib/UpdateChecker/FFmpegUpdateChecker.cs b/ShareX.HelpersLib/UpdateChecker/FFmpegUpdateChecker.cs index c0ed92843..f5774d37d 100644 --- a/ShareX.HelpersLib/UpdateChecker/FFmpegUpdateChecker.cs +++ b/ShareX.HelpersLib/UpdateChecker/FFmpegUpdateChecker.cs @@ -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; } diff --git a/ShareX.MediaLib/FFmpegDownloader.cs b/ShareX.MediaLib/FFmpegDownloader.cs index 781124fec..1a1355031 100644 --- a/ShareX.MediaLib/FFmpegDownloader.cs +++ b/ShareX.MediaLib/FFmpegDownloader.cs @@ -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"; } diff --git a/ShareX/TaskHelpers.cs b/ShareX/TaskHelpers.cs index 144734eb8..093fc2d5b 100644 --- a/ShareX/TaskHelpers.cs +++ b/ShareX/TaskHelpers.cs @@ -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.",