public void MetaDataJsonMatches() { var metadataPointer = NativeCore.GetNativeMetadata((int)ProgrammingPlatform.dotnet); var metadata = Marshal.PtrToStringUTF8(metadataPointer); Assert.Equal("", metadata); }
private bool RunGameLoop() { while (!NativeCore.PeekMessage(out this.message, IntPtr.Zero, 0, 0, 0)) { NativeCore.QueryPerformanceCounter(ref this.updateEndCount); this.updateDeltaCount = this.updateEndCount - this.updateStartCount; this.updateDeltaSeconds = this.updateDeltaCount / (double)this.counterFrequency; if (this.updateDeltaSeconds >= this.requestedUpdateDelta) { this.Update(this.updateDeltaSeconds); NativeCore.QueryPerformanceCounter(ref this.updateStartCount); } NativeCore.QueryPerformanceCounter(ref this.renderEndCount); this.renderDeltaCount = this.renderEndCount - this.renderStartCount; this.renderDeltaSeconds = this.renderDeltaCount / (double)this.counterFrequency; if (this.renderDeltaSeconds >= this.requestedRenderDelta) { this.Render(this.renderDeltaSeconds); NativeCore.QueryPerformanceCounter(ref this.renderStartCount); } } this.OnHandleMessage(this.message); return(this.ExitGame); }
private void RunApplication() { NativeCore.QueryPerformanceFrequency(ref this.counterFrequency); NativeCore.QueryPerformanceCounter(ref this.updateStartCount); this.updateEndCount = this.updateStartCount; this.renderStartCount = this.updateEndCount; this.renderEndCount = this.renderStartCount; while (!this.RunGameLoop()) { Application.DoEvents(); } Application.DoEvents(); Application.Exit(); }
public void MetaDataExceptionWorks() { var metadataPointer = NativeCore.GetNativeMetadata(5000000); var metadata = Marshal.PtrToStringUTF8(metadataPointer); }
public void MetaDataJsonIsLongerThanBufferSize() { var metadataPointer = NativeCore.GetNativeMetadata((int)ProgrammingPlatform.dotnet); var metadata = Marshal.PtrToStringUTF8(metadataPointer, 8200); }
public Display GetDisplay(Form window) { var deviceContext = NativeCore.GetDC(window.Handle); return(GetDisplay(deviceContext)); }