예제 #1
0
        private void InitializeOverlay()
        {
            DEVMODE devMode = default;

            devMode.dmSize = (short)Marshal.SizeOf <DEVMODE>();
            NativeWrappers.EnumDisplaySettings(null, -1, ref devMode);

            _window = new OverlayWindow(0, 0, devMode.dmPelsWidth, devMode.dmPelsHeight)
            {
                IsTopmost = true,
                IsVisible = true
            };

            _graphics = new Graphics()
            {
                MeasureFPS = false,
                PerPrimitiveAntiAliasing  = false,
                TextAntiAliasing          = true,
                UseMultiThreadedFactories = false,
                VSync = false
            };

            _isOverlayInitialized = true;
        }