Permalink
Browse files

Alchemerge~

  • Loading branch information...
Lirusaito committed May 3, 2016
1 parent 32039e8 commit 3242683ee34269f12e40c62dda40ce737f1c811c
Showing with 20 additions and 2 deletions.
  1. +20 −2 indra/newview/llappviewerwin32.cpp
@@ -122,8 +122,23 @@ bool create_app_mutex()
return result;
}
+#ifdef USE_NVAPI
#define NVAPI_APPNAME L"Second Life"
+/*
+This function is used to print to the command line a text message
+describing the nvapi error and quits
+*/
+void nvapi_error(NvAPI_Status status)
+{
+ NvAPI_ShortString szDesc = { 0 };
+ NvAPI_GetErrorMessage(status, szDesc);
+ LL_WARNS() << szDesc << LL_ENDL;
+
+ //should always trigger when asserts are enabled
+ //llassert(status == NVAPI_OK);
+}
+
void ll_nvapi_init(NvDRSSessionHandle hSession)
{
// (2) load all the system settings into the session
@@ -193,6 +208,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
return;
}
}
+#endif
//#define DEBUGGING_SEH_FILTER 1
#if DEBUGGING_SEH_FILTER
@@ -250,6 +266,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
return -1;
}
+#ifdef USE_NVAPI
NvAPI_Status status;
// Initialize NVAPI
@@ -270,6 +287,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
ll_nvapi_init(hSession);
}
}
+#endif
// Have to wait until after logging is initialized to display LFH info
if (num_heaps > 0)
@@ -338,14 +356,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
LLAppViewer::sUpdaterInfo = NULL ;
}
-
-
+#ifdef USE_NVAPI
// (NVAPI) (6) We clean up. This is analogous to doing a free()
if (hSession)
{
NvAPI_DRS_DestroySession(hSession);
hSession = 0;
}
+#endif
return 0;
}

0 comments on commit 3242683

Please sign in to comment.