- Application.EnableVisualStyles();\r
- Application.SetCompatibleTextRenderingDefault(false);\r
- Application.Run(new frmMain());\r
+ Screen scr = Screen.PrimaryScreen;\r
+ if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))\r
+ MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x620 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ else\r
+ {\r
+ string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\logs");\r
+ if (!Directory.Exists(logDir))\r
+ Directory.CreateDirectory(logDir);\r
+\r
+ if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml")))\r
+ {\r
+ PresetsHandler x = new PresetsHandler();\r
+ x.UpdateBuiltInPresets();\r
+ }\r
+\r
+ Application.EnableVisualStyles();\r
+ Application.SetCompatibleTextRenderingDefault(false);\r
+ Application.Run(new frmMain());\r
+ }\r