Subversion Repositories Kolibri OS

Rev

Rev 2648 | Rev 2709 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2648 Rev 2654
Line 67... Line 67...
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
include 'struct.inc'
70
include 'struct.inc'
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
$Revision: 2648 $
72
$Revision: 2654 $
Line 381... Line 381...
381
        mov     [_display.bpp], eax
381
        mov     [_display.bpp], eax
382
        mov     [_display.vrefresh], 60
382
        mov     [_display.vrefresh], 60
Line 383... Line 383...
383
 
383
 
384
        movzx   eax, word [BOOT_VAR+BOOT_X_RES]; X max
384
        movzx   eax, word [BOOT_VAR+BOOT_X_RES]; X max
-
 
385
        mov     [_display.width], eax
385
        mov     [_display.width], eax
386
        mov     [display_width_standard], eax
386
        dec     eax
387
        dec     eax
387
        mov     [Screen_Max_X], eax
388
        mov     [Screen_Max_X], eax
388
        mov     [screen_workarea.right], eax
389
        mov     [screen_workarea.right], eax
389
        movzx   eax, word [BOOT_VAR+BOOT_Y_RES]; Y max
390
        movzx   eax, word [BOOT_VAR+BOOT_Y_RES]; Y max
-
 
391
        mov     [_display.height], eax
390
        mov     [_display.height], eax
392
        mov     [display_height_standard], eax
391
        dec     eax
393
        dec     eax
392
        mov     [Screen_Max_Y], eax
394
        mov     [Screen_Max_Y], eax
393
        mov     [screen_workarea.bottom], eax
395
        mov     [screen_workarea.bottom], eax
394
        movzx   eax, word [BOOT_VAR+BOOT_VESA_MODE]; screen mode
396
        movzx   eax, word [BOOT_VAR+BOOT_VESA_MODE]; screen mode
Line 2053... Line 2055...
2053
        dd      sysfn_mouse_acceleration; 19 = set/get mouse acceleration
2055
        dd      sysfn_mouse_acceleration; 19 = set/get mouse acceleration
2054
        dd      sysfn_meminfo           ; 20 = get extended memory info
2056
        dd      sysfn_meminfo           ; 20 = get extended memory info
2055
        dd      sysfn_pid_to_slot       ; 21 = get slot number for pid
2057
        dd      sysfn_pid_to_slot       ; 21 = get slot number for pid
2056
        dd      sysfn_min_rest_window   ; 22 = minimize and restore any window
2058
        dd      sysfn_min_rest_window   ; 22 = minimize and restore any window
2057
        dd      sysfn_min_windows       ; 23 = minimize all windows
2059
        dd      sysfn_min_windows       ; 23 = minimize all windows
-
 
2060
        dd      sysfn_set_screen_sizes  ; 24 = set screen sizes for Vesa
2058
sysfn_num = ($ - sys_system_table)/4
2061
sysfn_num = ($ - sys_system_table)/4
2059
endg
2062
endg
2060
;------------------------------------------------------------------------------
2063
;------------------------------------------------------------------------------
2061
sys_system:
2064
sys_system:
2062
        dec     ebx
2065
        dec     ebx
Line 2408... Line 2411...
2408
        call    minimize_all_window
2411
        call    minimize_all_window
2409
        mov     [esp+32], eax
2412
        mov     [esp+32], eax
2410
        call    change_task
2413
        call    change_task
2411
        ret
2414
        ret
2412
;------------------------------------------------------------------------------
2415
;------------------------------------------------------------------------------
-
 
2416
sysfn_set_screen_sizes:
-
 
2417
        cmp     [SCR_MODE], word 0x13
-
 
2418
        jbe     .exit
-
 
2419
 
-
 
2420
        cmp     [_display.select_cursor], select_cursor
-
 
2421
        jne     .exit
-
 
2422
 
-
 
2423
        cmp     ecx, [display_width_standard]
-
 
2424
        ja      .exit
-
 
2425
 
-
 
2426
        cmp     edx, [display_height_standard]
-
 
2427
        ja      .exit
-
 
2428
 
-
 
2429
        pushfd
-
 
2430
        cli
-
 
2431
        mov     eax, ecx
-
 
2432
        mov     ecx, [BytesPerScanLine]
-
 
2433
        mov     [_display.width], eax
-
 
2434
        dec     eax
-
 
2435
        mov     [_display.height], edx
-
 
2436
        dec     edx
-
 
2437
; eax - new Screen_Max_X
-
 
2438
; edx - new Screen_Max_Y
-
 
2439
        mov     [do_not_touch_winmap], 1
-
 
2440
        call    set_screen
-
 
2441
        mov     [do_not_touch_winmap], 0
-
 
2442
        popfd
-
 
2443
        call    change_task
-
 
2444
.exit:
-
 
2445
        ret
-
 
2446
;------------------------------------------------------------------------------
2413
uglobal
2447
uglobal
2414
screen_workarea RECT
2448
screen_workarea RECT
-
 
2449
display_width_standard dd 0
-
 
2450
display_height_standard dd 0
-
 
2451
do_not_touch_winmap db 0
2415
window_minimize db 0
2452
window_minimize db 0
2416
sound_flag      db 0
2453
sound_flag      db 0
-
 
2454
 
2417
endg
2455
endg
Line 2418... Line 2456...
2418
 
2456
 
2419
UID_NONE=0
2457
UID_NONE=0
2420
UID_MENUETOS=1   ;official
2458
UID_MENUETOS=1   ;official
Line 5156... Line 5194...
5156
        jnz     @r
5194
        jnz     @r
5157
        ret
5195
        ret
5158
;------------------------------------------------------------------------------
5196
;------------------------------------------------------------------------------
5159
align 4
5197
align 4
5160
set_screen:
5198
set_screen:
-
 
5199
; in:
-
 
5200
; eax - new Screen_Max_X
-
 
5201
; ecx - new BytesPerScanLine
-
 
5202
; edx - new Screen_Max_Y
5161
        cmp     eax, [Screen_Max_X]
5203
        cmp     eax, [Screen_Max_X]
5162
        jne     .set
5204
        jne     .set
Line 5163... Line 5205...
5163
 
5205
 
5164
        cmp     edx, [Screen_Max_Y]
5206
        cmp     edx, [Screen_Max_Y]
Line 5179... Line 5221...
5179
        push    esi
5221
        push    esi
5180
        push    edi
5222
        push    edi
Line 5181... Line 5223...
5181
 
5223
 
Line -... Line 5224...
-
 
5224
        pushad
-
 
5225
 
-
 
5226
        cmp     [do_not_touch_winmap], 1
5182
        pushad
5227
        je      @f
Line 5183... Line 5228...
5183
 
5228
 
5184
        stdcall kernel_free, [_WinMapAddress]
5229
        stdcall kernel_free, [_WinMapAddress]
5185
 
5230
 
Line 5186... Line 5231...
5186
        mov     eax, [_display.width]
5231
        mov     eax, [_display.width]
5187
        mul     [_display.height]
5232
        mul     [_display.height]
5188
        mov     [_WinMapSize], eax
5233
        mov     [_WinMapSize], eax
5189
 
5234
 
-
 
5235
        stdcall kernel_alloc, eax
-
 
5236
        mov     [_WinMapAddress], eax
-
 
5237
        test    eax, eax
Line -... Line 5238...
-
 
5238
        jz      .epic_fail
-
 
5239
; store for f.18.24
-
 
5240
        mov     eax, [_display.width]
5190
        stdcall kernel_alloc, eax
5241
        mov     [display_width_standard], eax
5191
        mov     [_WinMapAddress], eax
5242
 
5192
        test    eax, eax
5243
        mov     eax, [_display.height]
5193
        jz      .epic_fail
5244
        mov     [display_height_standard], eax
5194
 
5245
@@: