Removed old win32 startup window as no-longer used.
Win32: The COM library must be initialized/uninitialized for each thread that uses it. Now that DirectInput init happens in a worker thread, make the necessary COM calls.
Added application_t to hold vars concerned with application state, e.g. the hInstance handle and the game API.
Further improvements to the way Doomsday interacts with the environment. Pass on any exit code given to us by the windows message loop on exit. Stop checking windows messages as soon as we receive a WM_QUIT notification. Always check that GetDC() returns a valid handle, it is not guaranteed. When doing a normal shutdown, be sure to unregister our window class.
Improved startup so that we always release any acquired handles when we have to abort and shutdown.
When shuting down, do things properly by calling PostQuitMessage(). Doomsday can now be closed and minimized by using the buttons in the title bar.
Enhanced FR_PrepareFont() so that we always release the device handle once changes are made (each thread only has 5 of these to play with, so we need to manage them correctly).
All platforms: Wrap system window management with the ddwindow_t structure designed to be used a portable means to reference a window. Each platform therefore needs its own routines for create/destroy/hide/show/setposition/setsize. I've implemented these for win32 but code is required for Unix (and perhaps Cocao too?).
When composing the main window title, don't segfault if a renderer hasn't been loaded yet.
Removed old win32 startup window as no-longer used.
Win32:
The COM library must be initialized/uninitialized for each thread that uses it. Now that DirectInput init happens in a worker thread, make the necessary COM calls.
Added application_t to hold vars concerned with application state, e.g. the hInstance handle and the game API.
Further improvements to the way Doomsday interacts with the environment. Pass on any exit code given to us by the windows message loop on exit. Stop checking windows messages as soon as we receive a WM_QUIT notification. Always check that GetDC() returns a valid handle, it is not guaranteed. When doing a normal shutdown, be sure to unregister our window class.
Improved startup so that we always release any acquired handles when we have to abort and shutdown.
When shuting down, do things properly by calling PostQuitMessage().
Doomsday can now be closed and minimized by using the buttons in the title bar.
Enhanced FR_PrepareFont() so that we always release the device handle once changes are made (each thread only has 5 of these to play with, so we need to manage them correctly).
All platforms:
Wrap system window management with the ddwindow_t structure designed to be used a portable means to reference a window. Each platform therefore needs its own routines for create/destroy/hide/show/setposition/setsize. I've implemented these for win32 but code is required for Unix (and perhaps Cocao too?).
When composing the main window title, don't segfault if a renderer hasn't been loaded yet.