| 386 | static BOOL need_reboot = FALSE; |
| 387 | |
| 388 | void softgpu_done(HWND hwnd, BOOL reboot) |
| 389 | { |
| 390 | if(installbtn != INVALID_HANDLE_VALUE) |
| 391 | { |
| 392 | DWORD sty = GetWindowLongA(installbtn, GWL_STYLE) & (~WS_DISABLED); |
| 393 | SetWindowLongA(installbtn, GWL_STYLE, sty); |
| 394 | } |
| 395 | |
| 396 | SetWindowText(infobox, "SUCCESS!"); |
| 397 | |
| 398 | if(reboot) |
| 399 | { |
| 400 | int id = MessageBoxA(hwnd, "Installation complete! Reboot is required. Reboot now?", "Complete!", MB_YESNO | MB_ICONQUESTION); |
| 401 | if(id == IDYES) |
| 402 | { |
| 403 | need_reboot = TRUE; |
| 404 | PostQuitMessage(0); |
| 405 | } |
| 406 | } |
| 407 | else |
| 408 | { |
| 409 | int id = MessageBoxA(hwnd, "Driver files copied successfully! Close installer now?", "Complete!", MB_YESNO | MB_ICONQUESTION); |
| 410 | if(id == IDYES) |
| 411 | { |
| 412 | PostQuitMessage(0); |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | void softgpu_reset(HWND hwnd) |
| 418 | { |