private void RefreshLightingTarget(On.Terraria.Main.orig_SetDisplayMode orig, int width, int height, bool fullscreen)
        {
            if (!Main.gameInactive && width != Main.screenWidth || height != Main.screenHeight)
            {
                StarlightRiver.LightingBufferInstance.ResizeBuffers(width, height);
            }

            orig(width, height, fullscreen);
        }
Пример #2
0
        private void RefreshTargets(On.Terraria.Main.orig_SetDisplayMode orig, int width, int height, bool fullscreen)
        {
            if (!Main.gameInactive && (width != Main.screenWidth || height != Main.screenHeight))
            {
                ScaledTileTarget = new RenderTarget2D(Main.graphics.GraphicsDevice, width, height);
            }

            orig(width, height, fullscreen);
        }
 public static void RecreateRenderTargetsOnScreenChange(On.Terraria.Main.orig_SetDisplayMode orig, int width, int height, bool fullscreen)
 {
     SGAmod.CreateRenderTarget2Ds(width, height, fullscreen);
     orig(width, height, fullscreen);
 }