From 9f4d7b14d8f0fe3940d87906999ba6779ba38295 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 19 Jan 2003 21:13:17 +0000 Subject: [PATCH] handle XP --- stepmania/src/Crash.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stepmania/src/Crash.cpp b/stepmania/src/Crash.cpp index 5631bfd17f..530a8f68ed 100644 --- a/stepmania/src/Crash.cpp +++ b/stepmania/src/Crash.cpp @@ -273,6 +273,10 @@ long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) { /* If we're fullscreen, the fullscreen d3d window will obscure * the crash dialog. Do this before we suspend threads, or it'll * deadlock if the thread controlling this window has been stopped. */ + /* XXX problem: If the sound thread crashes at the same time the main + * thread tells it to shut down, the main thread will be blocking waiting + * for the sound thread to finish; we'll come here and deadlock waiting for + * it to hide. Hmmmmm. */ ShowWindow( g_hWndMain, SW_HIDE ); ///////////////////////// @@ -1334,14 +1338,16 @@ static void DoSave(const EXCEPTION_POINTERS *pExc) { OSVERSIONINFO ovi; ovi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + /* XXX: rewrite this mess */ if (GetVersionEx(&ovi)) { Report(NULL, hFile, "Windows %d.%d (Win%s build %d) [%s]", ovi.dwMajorVersion, ovi.dwMinorVersion, - ovi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS - ? (ovi.dwMinorVersion>0 ? "98" : "95") - : ovi.dwPlatformId == VER_PLATFORM_WIN32_NT - ? (ovi.dwMajorVersion >= 5 ? "2000" : "NT") + ovi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS? + (ovi.dwMinorVersion>0? "98" : "95"): + ovi.dwPlatformId == VER_PLATFORM_WIN32_NT? + (ovi.dwMajorVersion >= 5? + (ovi.dwMinorVersion>0? "XP":"2000"): "NT") : "?", ovi.dwBuildNumber & 0xffff, ovi.szCSDVersion);