static unsafe void Main(string[] args) { #if FAMISTUDIO_WINDOWS try { // This is only supported in Windows 8.1+. SetProcessDpiAwareness(1 /*Process_System_DPI_Aware*/); } catch { } #endif Settings.Load(); Cursors.Initialize(); RenderTheme.Initialize(); PlatformUtils.Initialize(); #if FAMISTUDIO_WINDOWS PerformanceCounter.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #endif var famiStudio = new FamiStudio(args.Length > 0 ? args[0] : null); famiStudio.Run(); Settings.Save(); }
public FamiStudioForm(FamiStudio famistudio) { Cursors.Initialize(); this.famistudio = famistudio; timer.Tick += timer_Tick; timer.Interval = 4; timer.Start(); InitializeComponent(); var scaling = Direct2DTheme.MainWindowScaling; toolbar.Height = (int)(toolbar.Height * scaling); tableLayout.RowStyles[0].Height = (int)(tableLayout.RowStyles[0].Height * scaling); projectExplorer.Width = (int)(projectExplorer.Width * scaling); }
static unsafe void Main(string[] args) { #if FAMISTUDIO_WINDOWS try { // This is only supported in Windows 8.1+. SetProcessDpiAwareness(1 /*Process_System_DPI_Aware*/); } catch { } #endif Settings.Load(); RenderTheme.Initialize(); PlatformUtils.Initialize(); Cursors.Initialize(); FamiStudioTempoUtils.Initialize(); NesApu.InitializeNoteTables(); #if FAMISTUDIO_WINDOWS WinUtils.Initialize(); PerformanceCounter.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #endif #if FAMISTUDIO_LINUX LinuxUtils.SetProcessName("FamiStudio"); #endif var cli = new CommandLineInterface(args); if (!cli.Run()) { var famiStudio = new FamiStudio(args.Length > 0 ? args[0] : null); famiStudio.Run(); } Settings.Save(); #if FAMISTUDIO_LINUX // We sometimes gets stuck here on Linux, lets abort. Environment.Exit(0); #endif }
public FamiStudioForm(FamiStudio famistudio) { Cursors.Initialize(); this.famistudio = famistudio; timer.Tick += timer_Tick; timer.Interval = 4; timer.Start(); InitializeComponent(); var scaling = Direct2DTheme.MainWindowScaling; toolbar.Height = (int)(toolbar.Height * scaling); tableLayout.RowStyles[0].Height = (int)(tableLayout.RowStyles[0].Height * scaling); projectExplorer.Width = (int)(projectExplorer.Width * scaling); try { using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop")) { if (key != null) { Object o = key.GetValue("MouseWheelRouting"); if (o != null) { mouseWheelRouting = (int)(o) != 0; } } } } catch { } }
static unsafe void Main(string[] args) { #if FAMISTUDIO_WINDOWS try { // This is only supported in Windows 8.1+. SetProcessDpiAwareness(1 /*Process_System_DPI_Aware*/); } catch { } if (!PlatformUtils.IsVS2015RuntimeInstalled()) { if (MessageBox.Show("You seem to be missing the VS 2015 C++ Runtime which is required to run FamiStudio, would you like to visit the FamiStudio website for instruction on how to install it?", "Missing Component", MessageBoxButtons.YesNo) == DialogResult.Yes) { Utils.OpenUrl("https://famistudio.org/doc/#windows"); } return; } if (!XAudio2Stream.TryDetectXAudio2()) { if (MessageBox.Show("You seem to be missing parts of DirectX which is required to run FamiStudio, would you like to visit the FamiStudio website for instruction on how to install it?", "Missing Component", MessageBoxButtons.YesNo) == DialogResult.Yes) { Utils.OpenUrl("https://famistudio.org/doc/#windows"); } return; } #endif Settings.Load(); RenderTheme.Initialize(); PlatformUtils.Initialize(); #if !FAMISTUDIO_MACOS Cursors.Initialize(); #endif FamiStudioTempoUtils.Initialize(); NesApu.InitializeNoteTables(); #if FAMISTUDIO_WINDOWS WinUtils.Initialize(); PerformanceCounter.Initialize(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #endif #if FAMISTUDIO_LINUX LinuxUtils.SetProcessName("FamiStudio"); #endif var cli = new CommandLineInterface(args); if (!cli.Run()) { var famiStudio = new FamiStudio(args.Length > 0 ? args[0] : null); famiStudio.Run(); } Settings.Save(); #if FAMISTUDIO_LINUX // We sometimes gets stuck here on Linux, lets abort. Environment.Exit(0); #endif }