After some brief testing I can say things are looking quite good. Not spectacular, but not bad either. Performance wise I get 50fps average with most Windows Glide2x games I tested so far and around 30fps with Glide3x games that don't utilize lfb heavily.
Tests are done on Intel i7 6700K 4.0 GHz and Windows 98 SE as a guest operating system. QEMU is 4.1.0, Win32 version and nGlide latest dev version. Acceleration used is TCG, HAX crashes with Win98 and WHPX isn't available for 32-bit builds.
I will soon publish the first wave of the Glide implementation issues I found in the patch. In the meantime I have an important question for you, Kjliew.
Can you rewrite the patch so Glide API functions will be executed from the same thread that created QEMU window? Perhaps you are wondering why all Glide wrappers freeze with your patch and fullscreen exclusive mode.
That's because the patch calls Glide functions from a different thread that created QEMU main window. What's even worse QEMU (SDL2) message pump is executed only between Glide API invocations.
The requirement for D3D fullscreen mode is that 3D devices need to be created and released from the same thread that created a window. nGlide can cover such cases and can synchronize itself, but like any other software it needs windows message pump to be functioning during Glide API execution (which QEMU don't provide waiting for Glide API call to be complete).
Some games like Hitman forget to call grSstWinClose() at exit, directly calling grGlideShutdown(). This create a situation where nGlide doesn't have a chance to synchronize itself.
The sequence is as follows:
-grGlideShutdown() [from other thread]
-Message pump [activates synchronization]
-FreeLibrary(glidexx.dll)
-grGlideShutdown() [from window thread, crash to desktop due to the fact glidexx.dll is already unloaded]
In such scenario I have two choices. Not to offer fullscreen mode and Alt+Enter switch feature for QEMU (very bad) or to hook your FreeLibrary() call, making as a result glidexx.dll libraries loaded permanently within QEMU process.
Another workaround is to create a second window from the same thread that calls Glide API functions (this is exactly what you do with CreateWindow option in glide.cfg), but it's even worse, so I don't consider it as a reasonable solution.
Please let me know what are the options.
