2007-03-21 23:58:33 +01:00
|
|
|
$Revision$
|
2007-03-26 14:18:08 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2005-10-06 19:56:22 +02:00
|
|
|
;
|
|
|
|
; Call of videomode driver's functions
|
|
|
|
;
|
|
|
|
; (Add in System function 21 (and/or 26) as a subfunction 13)
|
|
|
|
;
|
|
|
|
; Author: Trans
|
|
|
|
; Date: 19.07.2003
|
|
|
|
;
|
|
|
|
; Include in MeOS kernel and compile with FASM
|
|
|
|
;
|
2006-02-18 11:41:47 +01:00
|
|
|
|
|
|
|
uglobal
|
|
|
|
old_screen_width dd ?
|
|
|
|
old_screen_height dd ?
|
|
|
|
endg
|
|
|
|
|
2005-10-06 19:56:22 +02:00
|
|
|
cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS
|
|
|
|
jne .no_vmode_drv_access
|
2007-03-01 21:32:19 +01:00
|
|
|
pushd [ScreenWidth] [ScreenHeight]
|
2006-02-18 11:41:47 +01:00
|
|
|
popd [old_screen_height] [old_screen_width]
|
2005-10-06 19:56:22 +02:00
|
|
|
or eax,-1 ; If driver is absent then eax does not change
|
2007-04-18 08:37:14 +02:00
|
|
|
call OS_BASE+0x760100 ; Entry point of video driver
|
2005-10-06 19:56:22 +02:00
|
|
|
mov [esp+36],eax
|
|
|
|
mov [esp+24],ebx
|
|
|
|
mov [esp+32],ecx
|
|
|
|
; mov [esp+28],edx
|
2006-02-18 11:41:47 +01:00
|
|
|
mov eax,[old_screen_width]
|
|
|
|
mov ebx,[old_screen_height]
|
2007-03-01 21:32:19 +01:00
|
|
|
sub eax,[ScreenWidth]
|
2006-02-18 11:41:47 +01:00
|
|
|
jnz @f
|
2007-03-01 21:32:19 +01:00
|
|
|
sub ebx,[ScreenHeight]
|
2006-02-18 11:41:47 +01:00
|
|
|
jz .resolution_wasnt_changed
|
|
|
|
jmp .lp1
|
2007-03-01 21:32:19 +01:00
|
|
|
@@: sub ebx,[ScreenHeight]
|
2006-02-18 11:41:47 +01:00
|
|
|
.lp1: sub [screen_workarea.right],eax
|
|
|
|
sub [screen_workarea.bottom],ebx
|
|
|
|
|
|
|
|
call repos_windows
|
2006-08-01 16:09:42 +02:00
|
|
|
mov eax, 0
|
|
|
|
mov ebx, 0
|
2007-03-01 21:32:19 +01:00
|
|
|
mov ecx, [ScreenWidth]
|
|
|
|
mov edx, [ScreenHeight]
|
2006-02-18 11:41:47 +01:00
|
|
|
call calculatescreen
|
|
|
|
|
|
|
|
.resolution_wasnt_changed:
|
2005-10-06 19:56:22 +02:00
|
|
|
ret
|
|
|
|
.no_vmode_drv_access:
|