MCPcopy Index your code
hub / github.com/processing/processing / checkDriverBug

Method checkDriverBug

app/src/processing/app/Base.java:278–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276 // Or maybe not, if NVIDIA keeps doing this [fry 170423]
277 // https://github.com/processing/processing/issues/4997
278 static private void checkDriverBug() {
279 if (System.getProperty("os.name").contains("Windows 10")) {
280 new Thread(new Runnable() {
281 public void run() {
282 try {
283 Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
284 BufferedReader reader = PApplet.createReader(p.getInputStream());
285 String line = null;
286 while ((line = reader.readLine()) != null) {
287 if (line.contains("3.7849")) {
288 EventQueue.invokeLater(new Runnable() {
289 public void run() {
290 Messages.showWarning("NVIDIA screwed up",
291 "Due to an NVIDIA bug, you need to update your graphics drivers,\n" +
292 "otherwise you won't be able to run any sketches. Update here:\n" +
293 "http://nvidia.custhelp.com/app/answers/detail/a_id/4378\n" +
294 "or read background about the issue at this link:\n" +
295 "https://github.com/processing/processing/issues/4853");
296 }
297 });
298 } else if (line.contains("3.8165")) {
299 EventQueue.invokeLater(new Runnable() {
300 public void run() {
301 Messages.showWarning("NVIDIA screwed up again",
302 "Due to an NVIDIA bug, you need to update your graphics drivers,\n" +
303 "otherwise you won't be able to run any sketches. Update here:\n" +
304 "http://nvidia.custhelp.com/app/answers/detail/a_id/4453/\n" +
305 "or read background about the issue at this link:\n" +
306 "https://github.com/processing/processing/issues/4997");
307 }
308 });
309 }
310 }
311 } catch (Exception e) {
312 Messages.loge("Problem checking NVIDIA driver", e);
313 }
314 }
315 }).start();
316 }
317 }
318
319
320 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers 1

createAndShowGUIMethod · 0.95

Calls 2

containsMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected