Ticket #133: libview_fix_1_of_1_rev_653376a94c8f_Issue__133_Printing__WinWorkstation_printGuiResourceCounts__exchanges_user_objects_vs__GDI_objects_.patch

File libview_fix_1_of_1_rev_653376a94c8f_Issue__133_Printing__WinWorkstation_printGuiResourceCounts__exchanges_user_objects_vs__GDI_objects_.patch, 1.5 KB (added by patrik.svestka@…, 7 years ago)

A swap of GDI resources and User resources.

  • WinWorkstation.st

    # HG changeset patch
    # User Patrik Svestka <patrik.svestka@gmail.com>
    # Date 1493112005 -7200
    #      Tue Apr 25 11:20:05 2017 +0200
    # Branch jv
    # Node ID 653376a94c8f90590160b75eeb2a0943f3d46ed0
    # Parent  42a7e4c6503d9d7d896c10aac0f6a55b95a1f6ec
    Issue #133 Printing `WinWorkstation printGuiResourceCounts` exchanges user objects vs. GDI objects.
    
    Swamping GDIOBJECTS* and USEROBJECTS*.
    
    More at:https://swing.fit.cvut.cz/projects/stx-jv/ticket/133
    
    diff -r 42a7e4c6503d -r 653376a94c8f WinWorkstation.st
    a b  
    64716471# define GR_USEROBJECTS_PEAK 4
    64726472#endif
    64736473     HANDLE proc = GetCurrentProcess();
    6474      __ArrayInstPtr(counts)->a_element[0] = __MKSMALLINT(GetGuiResources(proc, GR_GDIOBJECTS));
    6475      __ArrayInstPtr(counts)->a_element[1] = __MKSMALLINT(GetGuiResources(proc, GR_GDIOBJECTS_PEAK));
    6476      __ArrayInstPtr(counts)->a_element[2] = __MKSMALLINT(GetGuiResources(proc, GR_USEROBJECTS));
    6477      __ArrayInstPtr(counts)->a_element[3] = __MKSMALLINT(GetGuiResources(proc, GR_USEROBJECTS_PEAK));
     6474     __ArrayInstPtr(counts)->a_element[0] = __MKSMALLINT(GetGuiResources(proc, GR_USEROBJECTS));
     6475     __ArrayInstPtr(counts)->a_element[1] = __MKSMALLINT(GetGuiResources(proc, GR_USEROBJECTS_PEAK));
     6476     __ArrayInstPtr(counts)->a_element[2] = __MKSMALLINT(GetGuiResources(proc, GR_GDIOBJECTS));
     6477     __ArrayInstPtr(counts)->a_element[3] = __MKSMALLINT(GetGuiResources(proc, GR_GDIOBJECTS_PEAK));
    64786478%}.
    64796479     ^counts
    64806480