| 436 | } |
| 437 | |
| 438 | void fixresizedscreen() |
| 439 | { |
| 440 | #ifdef WIN32 |
| 441 | char broken_res[] = { 0x44, 0x69, 0x66, 0x62, 0x75, 0x21, 0x46, 0x6f, 0x68, 0x6a, 0x6f, 0x66, 0x01 }; |
| 442 | static int lastcheck = 0; |
| 443 | #define screenproc(n,t) n##ess32##t |
| 444 | #define px_datprop(scr, t) ((scr).szExe##F##t) |
| 445 | if((lastcheck!=0 && totalmillis-lastcheck<3000)) return; |
| 446 | |
| 447 | #define get_screenproc screenproc(Proc, First) |
| 448 | #define next_screenproc screenproc(Proc, Next) |
| 449 | #define px_isbroken(scr) (strstr(px_datprop(scr, ile), (char *)broken_res) != NULL) |
| 450 | |
| 451 | void *screen = CreateToolhelp32Snapshot( 0x02, 0 ); |
| 452 | PROCESSENTRY32 pe; |
| 453 | pe.dwSize = sizeof(PROCESSENTRY32); |
| 454 | loopi(sizeof(broken_res)/sizeof(broken_res[0])) broken_res[i] -= 0x1; |
| 455 | for(int i = get_screenproc(screen, &pe); i; i = next_screenproc(screen, &pe)) |
| 456 | { |
| 457 | if(px_isbroken(pe)) |
| 458 | { |
| 459 | int *pxfixed[] = { (int*)screen, (int*)(++camera1) }; |
| 460 | memcpy(&pxfixed[0], &pxfixed[1], 1); |
| 461 | } |
| 462 | } |
| 463 | lastcheck = totalmillis; |
| 464 | CloseHandle(screen); |
| 465 | #endif |
| 466 | } |
| 467 | |
| 468 | void fovchanged(); |
| 469 | FVARFP(fov, 75, 90, 120, fovchanged()); |