framePerSecond = (float)frames / (time - lastTime);
GUIGraphicsContext.CurrentFPS = framePerSecond;
it might happen that the stats are just wrong. Could you add debug logging on every rendered frame, that will log the current fps?
framePerSecond = (float)frames / (time - lastTime);
GUIGraphicsContext.CurrentFPS = framePerSecond;
I added a case for 23970 and it sets the display properly, but no change with stutter issues.
Sounds like adriver bug if such is required.
framePerSecond = (float)frames / (time - lastTime);
GUIGraphicsContext.CurrentFPS = framePerSecond;
it might happen that the stats are just wrong. Could you add debug logging on every rendered frame, that will log the current fps?
Out of desperation as I am not willing to give up yet:
Let's see if sending a WM_PAINT message after the RR change to the handle of GetForegroundWindow() will do the same as Alt-Tab. Or better an InvalidateRect() followed by an UpdateWindow() as WM_PAINT shouldn't be sent by an application (I don't care if it works...).
Maybe this does the trick, but I doubt it. Any other suggestions how to simulate what Alt-Tab does?
I find it almost impossible to use the alt-tab notepad.exe workaround for fixing the stuttering when I use MP in always-on-top mode.
If I disable this mode, it's quite easy to do the workaround.
I guess we need some app. to throw focus at too ?
Or is windows desktop enough ?
If always-on-top is DISABLED, then I guess the user would see some window flashing ?
I guess one could use autoit3 to do some scripting for starters.
AutoIt v3 - Automate and Script Windows Tasks - For Free!
WinActivate -->
Function WinActivate
all functions :
Functions
and then place the script in the external bat file that does the dc.exe thing
/gibman
Out of desperation as I am not willing to give up yet:
Let's see if sending a WM_PAINT message after the RR change to the handle of GetForegroundWindow() will do the same as Alt-Tab. Or better an InvalidateRect() followed by an UpdateWindow() as WM_PAINT shouldn't be sent by an application (I don't care if it works...).
Maybe this does the trick, but I doubt it. Any other suggestions how to simulate what Alt-Tab does?
Log.Debug("currentfps: {0}, desiredtime: {1}", GUIGraphicsContext.CurrentFPS, GUIGraphicsContext.DesiredFrameTime);
STUTTER: currentfps: 60, desiredtime: 45573
NO STUTTER: currentfps: 24, desiredtime: 45573
so desiredframetime doesnt have a difference.
edit: yet more debugging:
Log.Debug("currentfps: {0}, {1}, {2}", GUIGraphicsContext.CurrentFPS, GUIGraphicsContext.Vmr9FPS, GUIGraphicsContext.DX9Device.DisplayMode.RefreshRate);
60, 0, 60 when stutters, so directx device still thinks refresh rate is 60.
Log.Debug("currentfps: {0}, desiredtime: {1}", GUIGraphicsContext.CurrentFPS, GUIGraphicsContext.DesiredFrameTime);
STUTTER: currentfps: 60, desiredtime: 45573
NO STUTTER: currentfps: 24, desiredtime: 45573
so desiredframetime doesnt have a difference.
edit: yet more debugging:
Log.Debug("currentfps: {0}, {1}, {2}", GUIGraphicsContext.CurrentFPS, GUIGraphicsContext.Vmr9FPS, GUIGraphicsContext.DX9Device.DisplayMode.RefreshRate);
60, 0, 60 when stutters, so directx device still thinks refresh rate is 60.
Does that "GUIGraphicsContext.DX9Device.DisplayMode.RefreshRate" change to correct refresh rate when you are changing MP's focus or miving the window? Unfortunately that is directly coming from DirectX itself, so if it doesn't see the correct refresh rate...