diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-11-10 16:17:16 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-11-10 16:17:16 +0100 |
commit | c7b325dcfe40e1961862f8923ee3ee4cc190e450 (patch) | |
tree | 9f5e06545c48a630a26ba98c401180161993dae9 /TestDLL | |
parent | f5f76e4b191e393dfcdffe06a13d4aafe6e45f7f (diff) |
using new gdi_radar_check_if_redraw_necessary api function to increae performance and reduced Gdi update time to draw more frames per second
Diffstat (limited to 'TestDLL')
-rw-r--r-- | TestDLL/dllmain.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/TestDLL/dllmain.cpp b/TestDLL/dllmain.cpp index 481f4b4..fc3b7e8 100644 --- a/TestDLL/dllmain.cpp +++ b/TestDLL/dllmain.cpp @@ -195,7 +195,7 @@ static bool ConfigureAndInitGDI(void) gdi_radar_config cfg = {}; cfg.className = L"HR"; cfg.windowName = L"HRWND"; - cfg.minimumUpdateTime = 0.25f; + cfg.minimumUpdateTime = 0.20f; cfg.maximumRedrawFails = 5; cfg.reservedEntities = 16; cfg.drawAngles = true; @@ -344,7 +344,7 @@ void APIENTRY LibEntry(struct HuntCtx * HuntCtx) "TestDLL Notification", MB_OK | MB_ICONINFORMATION); return; -} + } void *bla = malloc(10); free(bla); #endif @@ -376,12 +376,9 @@ void APIENTRY LibEntry(struct HuntCtx * HuntCtx) if (!iEnt || iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->IsInLevelLoad()) { return; } - -#if 0 - static UINT64 exec_counter = 0; - if ((++exec_counter) % 500 == 0) { + if (!gdi_radar_check_if_redraw_necessary(ctx)) { + return; } -#endif gdi_radar_clear_entities(ctx); @@ -436,4 +433,4 @@ void APIENTRY LibEntry(struct HuntCtx * HuntCtx) } gdi_radar_process_window_events_nonblocking(ctx); - }
\ No newline at end of file +}
\ No newline at end of file |