TL;DR: Is there any way to get the current graphics mode's refresh rate?
I'm using Allegro 5.1 pulled on August 13, 2013, on a Windows 7 x86_64 laptop.
I'm currently looking to make a game loop that ideally runs each loop iteration on each monitor frame iteration (probably not correct wording there).
So in initialization I create the window specifying ALLEGRO_VSYNC then enter the loop, draw graphics then al_flip_display. The problem with this is that it is dependent on the refresh rate of the graphics mode. So if an object moves 1 pixel every frame on a display with a refresh rate of 60Hz, it will move twice as fast on a display with 120Hz. So, I need to know the refresh rate beforehand to accomodate for this in the game logic (distance = velocity / refresh rate).
al_get_new_display_refresh_rate apparently only returns what was previously set with al_set_new_display_refresh_rate (it should probably be said more explicitly in the docs).
al_get_num_display_modes/al_get_display_mode can enumerate all display modes, but does not tell you which is the current.
So the only option I have left is for the user to manually check the refresh rate of his graphics mode then enter it in the options, which we all know is backwards at its core.
(As an aside, I realize that graphics configurations can override the application's request for VSYNC, but I can't find any justification ever to disable VSYNC. Why the hell would anyone want tearing? It seems natural to align the CPU framerate with the GPU framerate. Nobody would even think of overwriting an audio buffer that's currently playing in the APU.)