private static int EndSceneHook(IntPtr device) { lock (_frameLock) { if (!Rendering.IsInitialized) { Rendering.Initialize(device); //Camera.ScreenHeight = WoWScript.Execute<int>("GetScreenHeight()", 0); //Camera.ScreenWidth = WoWScript.Execute<int>("GetScreenWidth()", 0); } Manager.Pulse(); Events.Pulse(); Rendering.Pulse(); if (OnFrame != null) { OnFrame(null, new EventArgs()); } } return((int)_endSceneHook.CallOriginal(device)); }