GameX Source Update: 5.09 to 5.10 ===================================================================== Below is a description of the changes in each patch: gamex-load_icon-proper_hinstance.patch In GameXClass::z_InitWindowClass(), LoadIcon() is called to set the application icon (which may have been set by the user from GameXClass::SetApplicationIcon()) with hInstance set to NULL. The hInstance parameter of the LoadIcon() function requires the instance from which to load the icon. According to the comment above SetApplicationIcon(), the user should specify an icon that they have included as a resource, therefore the hInstance must be that of the running program when the icon is user-specified. Warning: If this function is being used differently than suggested in the comment (if the user is specifying predefined icons) this change may introduce bugs. I added checks for all of the predefined icons that I could find, but there may be undocumented ones that I have missed. gamex-load_icon-hinstance.patch In GameXClass::z_DirectXCleanUp() Unload() is called for every member of z_sound_list, however the Unload() function removes the object from the list so its size changes dynamically over the course of the for loop resulting in unintended results. Instead it is now called on the last member of the array until the array is empty (last rather than first to avoid relocation of the members upon deletion). gamex-z_copying_images-erase.patch In ImageX::z_UnregisterCopyable(), the members of z_copying_images are selectively erased without repositioning the iterator after the erasure. This leads to problems if the array is repositioned. gamex-gcc_fixes.patch Lots of minor fixes to make GameX compile with gcc under Cygwin, which fall into several categories: * Including private C++ headers or redefining C datatypes * (FILE) Some differences in what gcc considers a compile-time * constant Removing spaces in macro functions Replace calls to * _strdate() with strftime() Fixing non-const references to * temporaries Removed incorrect ## in macros Made several function * macros variadic to mimic VC's behavior Conditionally defining glibc * equivalents to MSVC functions starting with _ Conditionally * replacing _asm {} with asm() equivalents Conditionally replacing * calls to _vcsprintf()/vsprintf() with vasprintf() -Kevin Locke kwl7@cornell.edu http://kevinlocke.name