SDL/src
Sam Lantinga 17950d4dc7 Fixed bug 1897 - CPU spike on Windows with WM_EVENT and OpenGL
buckyballreaction

On some Windows systems, when switching from fullscreen to windowed mode in my game, the CPU will spike and the application never shows the window again.

See the part of the e-mail thread here:

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-June/088626.html

I change the window by calling:

SDL_SetWindowFullscreen(gScreenInfo.sdlWindow, SDL_FALSE);
SDL_SetWindowSize(gScreenInfo.sdlWindow, sdlWindowWidth, sdlWindowHeight);

which you can see in our source:

https://code.google.com/p/bitfighter/source/browse/zap/VideoSystem.cpp#377

Then all of a sudden the application gets stuck in WIN_PumpEvents() in SDL_windowsevents.c.  I turned on WMMSG_DEBUG and found that there was an endless stream of WM_EVENT messages.  I also found that where WM_PAINT is being handled in the callback WIN_WindowProc(), ValidateRect is somehow not clearing, or it is persisting, the WM_EVENT message like it's supposed to (according to the docs).

This may be a hardware issue.  The issue has appeared on three different systems, one of them sporadically:
 - Windows XP SP3 running in VMware 9.0 (without VMWare 3D acceleration, but with the tools and drivers installed), Host: openSUSE 12.3 x86_64, NVidia NVS 3100M
 - Windows XP SP3 64bit running in VirtualBox, Host: Debian Wheezy (stable), Mobility Radeon HD 4100 (this was the sporadic one)
 - Windows 7 64 bit, Radeon 6770
2013-06-06 23:18:36 -07:00
..
atomic File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
audio Fixed compiling XAudio2 code with mingw64 2013-05-26 12:20:23 -07:00
core Moved prototype for static function out of header file to prevent warnings. 2013-05-30 23:25:03 +02:00
cpuinfo Happy New Year! 2013-02-15 08:47:44 -08:00
events Fixed bug 1882 - SDL_GetKeyboardState should return const. 2013-06-02 01:09:12 -07:00
file Fixed implicit function declaration for SDL_AndroidGetInternalStoragePath(). 2013-06-02 14:13:21 +02:00
haptic Fixed wrong documentation for haptic implementation. 2013-05-26 12:15:15 +02:00
joystick Fixed crash trying to get the GUID of an invalid joystick index 2013-06-06 18:20:06 -07:00
libm Happy New Year! 2013-02-15 08:47:44 -08:00
loadso Happy New Year! 2013-02-15 08:47:44 -08:00
main Added some extra protection to notify the developer if they haven't initialized the application properly. 2013-06-05 21:23:59 -07:00
power File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
render Re-apply texture filter when resetting direct3d renderer. 2013-05-29 06:31:48 -05:00
stdlib Fixed crash with movaps instruction in SDL_memcpy(), due to unaligned Uint32* cast and -O3 vectorization optimizations with gcc 4.9.0 2013-05-27 16:18:11 -07:00
test Fix bug 1492: Visual Studio builds sdl.lib and sdl.dll for version 2.0 (contributed by Jan Reitz); update SDL_bool handling in test_common to fix VS compiler warnings 2013-05-30 20:03:56 -07:00
thread Fixed bug 1881 - SDL will not compile with "SDL_THREADS" disabled. 2013-06-02 01:12:29 -07:00
timer File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
video Fixed bug 1897 - CPU spike on Windows with WM_EVENT and OpenGL 2013-06-06 23:18:36 -07:00
SDL_assert_c.h Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_assert.c Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_error_c.h File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_error.c File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_fatal.c Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_fatal.h Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_hints_c.h File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_hints.c File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_log.c Remove unnecessary debugger detection logic again from Win32 SDL_LogOutput 2013-06-06 07:25:41 -07:00
SDL.c Added some extra protection to notify the developer if they haven't initialized the application properly. 2013-06-05 21:23:59 -07:00