Executing timer_update() at the beginning of calc_frame_time in case event_process() taking a significant amount of time to reach the game window and therefor could make FrameTime be inaccurate

This commit is contained in:
zicodxx 2011-06-01 15:06:14 +02:00
parent dcc964817e
commit fc985c3ccb
2 changed files with 2 additions and 0 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
20110601
--------
2d/font.c, 2d/palette.c, 2d/pcx.c, arch/linux/hmiplay.c, arch/ogl/gr.c, arch/sdl/digi_mixer_music.c, arch/sdl/jukebox.c, editor/group.c, editor/kmine.c, editor/med.c, editor/mine.c, iff/iff.c, include/physfsx.h, main/ai.c, main/bm.c, main/bmread.c, main/cntrlcen.c, main/cntrlcen.h, main/credits.c, main/custom.c, main/digiobj.c, main/dumpmine.c, main/effects.c, main/effects.h, main/endlevel.c, main/fuelcen.c, main/fuelcen.h, main/game.c, main/game.h, main/gamefont.c, main/gamemine.c, main/gamemine.h, main/gamesave.c, main/gameseq.c, main/inferno.c, main/menu.c, main/menu.h, main/mission.c, main/newdemo.c, main/newmenu.c, main/object.c, main/piggy.c, main/piggy.h, main/player.c, main/playsave.c, main/polyobj.c, main/polyobj.h, main/powerup.c, main/powerup.h, main/robot.c, main/robot.h, main/segment.h, main/songs.c, main/state.c, main/switch.c, main/switch.h, main/text.c, main/titles.c, main/vclip.c, main/vclip.h, main/wall.c, main/wall.h, main/weapon.c, main/weapon.h, misc/hmp.c, misc/ignorecase.c, misc/physfsx.c, misc/strio.c, ui/keypad.c, ui/menubar.c: Got rid of cfile code: Renamed cfile-functions to use PHYSFSX-naming convention, Replaced cfile-macros with proper PHYSFS(X) calls; Introduced PHYSFSX_exists() which can check case-sensitive or case-insensitive to give more flexibility with game content
main/game.c: Executing timer_update() at the beginning of calc_frame_time in case event_process() taking a significant amount of time to reach the game window and therefor could make FrameTime be inaccurate
20110530
--------

View file

@ -445,6 +445,7 @@ void calc_frame_time()
fix64 timer_value;
fix last_frametime = FrameTime;
timer_update();
timer_value = timer_query();
FrameTime = timer_value - last_timer_value;