Subversion Repositories Kolibri OS

Rev

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

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