Rev 254 | Rev 281 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 254 | Rev 276 | ||
---|---|---|---|
Line 259... | Line 259... | ||
259 | ret |
259 | ret |
260 | endp |
260 | endp |
261 | 261 | ||
Line 262... | Line 262... | ||
262 | align 4 |
262 | align 4 |
- | 263 | alloc_cursor: |
|
- | 264 | ||
- | 265 | mov eax, CURSOR_SIZE |
|
- | 266 | call malloc |
|
- | 267 | test eax, eax |
|
- | 268 | jz .fail |
|
- | 269 | ||
- | 270 | xor ebx, ebx |
|
- | 271 | mov [eax+CURSOR.magic], 'CURS' |
|
- | 272 | mov [eax+CURSOR.size], CURSOR_SIZE |
|
- | 273 | mov [eax+CURSOR.pid], ebx |
|
- | 274 | mov [eax+CURSOR.hot_x], ebx |
|
- | 275 | mov [eax+CURSOR.hot_y], ebx |
|
- | 276 | .fail: |
|
- | 277 | ret |
|
- | 278 | ||
- | 279 | if 0 |
|
- | 280 | ||
- | 281 | align 4 |
|
263 | proc alloc_cursor |
282 | proc alloc_cursor |
Line 264... | Line 283... | ||
264 | 283 | ||
265 | pushfd |
284 | pushfd |
266 | cli |
285 | cli |
Line 293... | Line 312... | ||
293 | mov [eax+CURSOR.hot_y], ebx |
312 | mov [eax+CURSOR.hot_y], ebx |
294 | ret |
313 | ret |
295 | endp |
314 | endp |
296 | 315 | ||
Line -... | Line 316... | ||
- | 316 | ||
297 | align 4 |
317 | align 4 |
298 | proc free_cursor |
318 | proc free_cursor |
299 | pushfd |
319 | pushfd |
300 | cli |
320 | cli |
301 | xor edx, edx |
321 | xor edx, edx |
Line 320... | Line 340... | ||
320 | popfd |
340 | popfd |
321 | ret |
341 | ret |
322 | endp |
342 | endp |
323 | 343 | ||
Line -... | Line 344... | ||
- | 344 | end if |
|
Line 324... | Line 345... | ||
324 | 345 | ||
325 | align 4 |
346 | align 4 |
326 | proc set_cursor stdcall, hcursor:dword |
347 | proc set_cursor stdcall, hcursor:dword |
327 | mov eax, [hcursor] |
348 | mov eax, [hcursor] |
Line 463... | Line 484... | ||
463 | @@: |
484 | @@: |
464 | stdcall kernel_free, [esi+CURSOR.base] |
485 | stdcall kernel_free, [esi+CURSOR.base] |
465 | .exit: |
486 | .exit: |
466 | mov eax, [hcursor] |
487 | mov eax, [hcursor] |
467 | call free_cursor |
488 | call free |
468 | ret |
489 | .fail: |
469 | .fail: |
- | |
470 | ret |
490 | ret |
471 | endp |
491 | endp |
472 | 492 | ||
Line 473... | Line 493... | ||
473 | align 4 |
493 | align 4 |
Line 487... | Line 507... | ||
487 | sub ebx, 96 |
507 | sub ebx, 96 |
488 | .init: |
508 | .init: |
489 | mov [cur_def_interl], ebx |
509 | mov [cur_def_interl], ebx |
490 | 510 | ||
Line -... | Line 511... | ||
- | 511 | if 0 |
|
491 | xor eax, eax |
512 | xor eax, eax |
492 | mov edi, cursors |
513 | mov edi, cursors |
493 | mov ecx, CURSOR_SIZE*16 |
514 | mov ecx, CURSOR_SIZE*16 |
494 | cld |
515 | cld |
495 | rep stosd |
516 | rep stosd |
Line 500... | Line 521... | ||
500 | mov edx, cursor_map |
521 | mov edx, cursor_map |
501 | mov [cursor_start], edx |
522 | mov [cursor_start], edx |
502 | add edx, 8 |
523 | add edx, 8 |
503 | mov [cursor_end], edx |
524 | mov [cursor_end], edx |
504 | 525 | end if |
|
505 | stdcall load_driver, drv_hw_mouse |
526 | stdcall load_driver, drv_hw_mouse |
506 | mov [hw_cursor], eax |
527 | mov [hw_cursor], eax |
507 | test eax, eax |
528 | test eax, eax |
508 | jz .sw_mouse |
529 | jz .sw_mouse |
509 | 530 |