Rev 298 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 298 | Rev 300 | ||
---|---|---|---|
Line 491... | Line 491... | ||
491 | /* Display the window: */ |
491 | /* Display the window: */ |
492 | ShowWindow(win, SW_SHOW); |
492 | ShowWindow(win, SW_SHOW); |
493 | UpdateWindow(win); |
493 | UpdateWindow(win); |
Line 494... | Line 494... | ||
494 | 494 | ||
495 | GetClientRect(win, &rect); |
495 | GetClientRect(win, &rect); |
496 | fprintf(stderr, "I_InitGraphics: Client area: %ux%u\n", |
496 | printf("I_InitGraphics: Client area: %ux%u\n", |
Line 497... | Line 497... | ||
497 | rect.right-rect.left, rect.bottom-rect.top); |
497 | rect.right-rect.left, rect.bottom-rect.top); |
498 | 498 | ||
499 | if ( (rect.right-rect.left) != X_width ) |
499 | if ( (rect.right-rect.left) != X_width ) |
500 | { |
500 | { |
501 | fprintf(stderr, "I_InitGraphics: Fixing width\n"); |
501 | printf("I_InitGraphics: Fixing width\n"); |
502 | width += X_width - (rect.right-rect.left); |
502 | width += X_width - (rect.right-rect.left); |
503 | MoveWindow(win, 0, 0, width, height, TRUE); |
503 | MoveWindow(win, 0, 0, width, height, TRUE); |
504 | } |
504 | } |
505 | if ( (rect.bottom-rect.top) != X_height ) |
505 | if ( (rect.bottom-rect.top) != X_height ) |
506 | { |
506 | { |
507 | fprintf(stderr, "I_InitGraphics: Fixing height\n"); |
507 | printf("I_InitGraphics: Fixing height\n"); |
508 | height += X_height - (rect.bottom-rect.top); |
508 | height += X_height - (rect.bottom-rect.top); |
Line 509... | Line 509... | ||
509 | MoveWindow(win, 0, 0, width, height, TRUE); |
509 | MoveWindow(win, 0, 0, width, height, TRUE); |
510 | } |
510 | } |
511 | 511 | ||
Line 512... | Line 512... | ||
512 | GetClientRect(win, &rect); |
512 | GetClientRect(win, &rect); |
513 | fprintf(stderr, "I_InitGraphics: Client area: %ux%u\n", |
513 | printf("I_InitGraphics: Client area: %ux%u\n", |
514 | rect.right-rect.left, rect.bottom-rect.top); |
514 | rect.right-rect.left, rect.bottom-rect.top); |
515 | 515 | ||
Line 516... | Line 516... | ||
516 | dibDC = GetDC(win); |
516 | dibDC = GetDC(win); |
517 | BPP=1; |
517 | BPP=1; |
518 | bits = 8; //GetDeviceCaps(dibDC, BITSPIXEL); |
518 | bits = 8; //GetDeviceCaps(dibDC, BITSPIXEL); |
519 | fprintf(stderr, "I_InitGraphics: %i bpp screen\n", bits); |
519 | printf("I_InitGraphics: %i bpp screen\n", bits); |
Line 604... | Line 604... | ||
604 | if ( grabMouse ) |
604 | if ( grabMouse ) |
605 | { |
605 | { |
606 | ClipCursor(NULL); |
606 | ClipCursor(NULL); |
607 | ShowCursor(TRUE); |
607 | ShowCursor(TRUE); |
608 | } |
608 | } |
609 | fprintf(stderr, "WM_DESTROY\n"); |
609 | printf("WM_DESTROY\n"); |
610 | PostQuitMessage(0); |
610 | PostQuitMessage(0); |
611 | closed = 1; |
611 | closed = 1; |
612 | break; |
612 | break; |
Line 613... | Line 613... | ||
613 | 613 | ||
614 | case WM_MOVE: |
614 | case WM_MOVE: |
615 | GetWindowRect(win, &rect); |
615 | GetWindowRect(win, &rect); |
616 | fprintf(stderr, "%u,%u - %u, %u\n", |
616 | printf("%u,%u - %u, %u\n", |
617 | rect.left,rect.top,rect.right,rect.bottom); |
617 | rect.left,rect.top,rect.right,rect.bottom); |
618 | ClipCursor(&rect); |
618 | ClipCursor(&rect); |
Line 619... | Line 619... | ||
619 | break; |
619 | break; |
620 | 620 | ||
621 | case WM_ACTIVATE: |
621 | case WM_ACTIVATE: |
622 | fprintf(stderr, "WM_ACTIVATE %u\n", (unsigned) LOWORD(wparam)); |
622 | printf("WM_ACTIVATE %u\n", (unsigned) LOWORD(wparam)); |
623 | if ( LOWORD(wparam) ) |
623 | if ( LOWORD(wparam) ) |
624 | { |
624 | { |
625 | if ( !windowActive ) |
625 | if ( !windowActive ) |
626 | { |
626 | { |
627 | if ( grabMouse ) |
627 | if ( grabMouse ) |
628 | { |
628 | { |
629 | ClipCursor(NULL); /* helps with Win95? */ |
629 | ClipCursor(NULL); /* helps with Win95? */ |
630 | GetWindowRect(win, &rect); |
630 | GetWindowRect(win, &rect); |
631 | fprintf(stderr, "%u,%u - %u, %u\n", |
631 | printf("%u,%u - %u, %u\n", |
632 | rect.left,rect.top,rect.right,rect.bottom); |
632 | rect.left,rect.top,rect.right,rect.bottom); |
633 | ClipCursor(&rect); |
633 | ClipCursor(&rect); |
634 | ShowCursor(FALSE); |
634 | ShowCursor(FALSE); |