Subversion Repositories Kolibri OS

Rev

Rev 472 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 472 Rev 593
1
$Revision: 472 $
-
 
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
2
;;                                                              ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
5
;;                                                              ;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
7
 
-
 
8
$Revision: 593 $
-
 
9
 
8
 
10
 
9
;
11
;
10
; Call of videomode driver's functions
12
; Call of videomode driver's functions
11
;
13
;
12
; (Add in System function 21 (and/or 26) as a subfunction 13)
14
; (Add in System function 21 (and/or 26) as a subfunction 13)
13
;
15
;
14
; Author: Trans
16
; Author: Trans
15
; Date:  19.07.2003
17
; Date:  19.07.2003
16
;
18
;
17
; Include in MeOS kernel and compile with FASM
19
; Include in MeOS kernel and compile with FASM
18
;
20
;
19
 
21
 
20
uglobal
22
uglobal
21
  old_screen_width  dd ?
23
  old_screen_width  dd ?
22
  old_screen_height dd ?
24
  old_screen_height dd ?
23
endg
25
endg
24
 
26
 
25
     cmp  eax,13                 ; CALL VIDEOMODE DRIVER FUNCTIONS
27
     cmp  eax,13                 ; CALL VIDEOMODE DRIVER FUNCTIONS
26
     jne  .no_vmode_drv_access
28
     jne  .no_vmode_drv_access
27
        pushd   [ScreenWidth] [ScreenHeight]
29
        pushd   [ScreenWidth] [ScreenHeight]
28
	popd	[old_screen_height] [old_screen_width]
30
	popd	[old_screen_height] [old_screen_width]
29
     or   eax,-1                 ; If driver is absent then eax does not change
31
     or   eax,-1                 ; If driver is absent then eax does not change
30
     call (VMODE_BASE+0x100)     ; Entry point of video driver
32
     call (VMODE_BASE+0x100)     ; Entry point of video driver
31
     mov  [esp+36],eax
33
     mov  [esp+36],eax
32
     mov  [esp+24],ebx
34
     mov  [esp+24],ebx
33
     mov  [esp+32],ecx
35
     mov  [esp+32],ecx
34
;    mov  [esp+28],edx
36
;    mov  [esp+28],edx
35
	mov	eax,[old_screen_width]
37
	mov	eax,[old_screen_width]
36
	mov	ebx,[old_screen_height]
38
	mov	ebx,[old_screen_height]
37
        sub     eax,[ScreenWidth]
39
        sub     eax,[ScreenWidth]
38
	jnz	@f
40
	jnz	@f
39
        sub     ebx,[ScreenHeight]
41
        sub     ebx,[ScreenHeight]
40
	jz	.resolution_wasnt_changed
42
	jz	.resolution_wasnt_changed
41
	jmp	.lp1
43
	jmp	.lp1
42
    @@: sub     ebx,[ScreenHeight]
44
    @@: sub     ebx,[ScreenHeight]
43
  .lp1: sub	[screen_workarea.right],eax
45
  .lp1: sub	[screen_workarea.right],eax
44
	sub	[screen_workarea.bottom],ebx
46
	sub	[screen_workarea.bottom],ebx
45
 
47
 
46
	call	repos_windows
48
	call	repos_windows
47
        mov     eax, 0
49
        mov     eax, 0
48
        mov     ebx, 0
50
        mov     ebx, 0
49
        mov     ecx, [ScreenWidth]
51
        mov     ecx, [ScreenWidth]
50
        mov     edx, [ScreenHeight]
52
        mov     edx, [ScreenHeight]
51
	call	calculatescreen
53
	call	calculatescreen
52
 
54
 
53
  .resolution_wasnt_changed:
55
  .resolution_wasnt_changed:
54
     ret
56
     ret
55
   .no_vmode_drv_access:
57
   .no_vmode_drv_access: