From 49d568488ca9052d3275009e4ab6db716184bd59 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Sun, 28 Mar 2010 23:51:32 +0000 Subject: fixed fps limiting when using using virtual xfb, now fps = vps, in fact now real xfb is as fast as no using xfb, i'm thinking now that the correct thing is leave it enabled as default, and even remove the option. the problem is one strange behavior i found, in opengl when xfb is enable, frame limit causes the frame rate to be limited exact half the correct speed, so if you choose auto and the game uses 30 fps you get 15 fps so in opengl, you have to limit to the exact double of the game speed, 100 to pal games and 120 to ntsc. in d3d this not happened every time, it just happen when you change some time consuming setting like changing the ssaa or resizing the window, in that case you have to disable and re enable frame limit to get the correct fps to all the devs please if you can help me debug this, will give you a lot of thanks as i'm short in time to debug this error and is driving me crazy not to find the source of the problem. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5249 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 53e35c690a..1cf70b4dc9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -761,11 +761,12 @@ void OpenGL_Update() int height = rcWindow.bottom - rcWindow.top; // If we are rendering to a child window - if (EmuWindow::GetParentWnd() != 0) + if (EmuWindow::GetParentWnd() != 0 && (s_backbuffer_width != width || s_backbuffer_height != height) && width >= 4 && height >= 4) + { ::MoveWindow(EmuWindow::GetWnd(), 0, 0, width, height, FALSE); - - s_backbuffer_width = width; - s_backbuffer_height = height; + s_backbuffer_width = width; + s_backbuffer_height = height; + } #elif defined(HAVE_X11) && HAVE_X11 #endif -- cgit v1.2.3