_go32_info_block.size_of_transfer_buffer

This is a discussion on _go32_info_block.size_of_transfer_buffer within the Game Programming forums, part of the General Programming Boards category; I have been going through a few graphics tutorials which I found @ http://www-scf.usc.edu/~akotaobi . If you have done the ...

  1. #1
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788

    _go32_info_block.size_of_transfer_buffer

    I have been going through a few graphics tutorials which I found @ http://www-scf.usc.edu/~akotaobi.

    If you have done the same tuts, then maybe you can help me.

    I have aproblem with the following function in that it always fails because the sizeof(inf) is always less than _go32_info_block.size_of_transfer_buffer.

    Code:
    void get_svga_modeinfo (int mode, modeinfo& inf) {
    
        // Retrieve data for the screenmode and stuff it in the modeinfo struct.
        __dpmi_regs r;
        assert(sizeof(inf) < _go32_info_block.size_of_transfer_buffer);
    
        r.x.ax = 0x4F01; // Mode info retrieval function.
        r.x.cx = mode;
        r.x.di = __tb & 0x0F;
        r.x.es = (__tb >> 4) & 0xFFFF;
        __dpmi_int(0x10, &r);
    
        dosmemget(__tb, sizeof(inf), &inf);
    
        // Save some info to avoid redundant calculations.
        
        maxx = inf.XResolution;
        maxy = inf.YResolution;
        bits_per_pixel = inf.BitsPerPixel;
        bytes_per_pixel = bits_per_pixel * 8;
        wingranularity = inf.WinGranularity;
    }
    I printed the values for both and this is what I get :
    sizeof( inf ) = 256
    _go32_info_block.size_of_transfer_buffer = 16384

    What could it be?

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    _go32_info_block.size_of_transfer_buffer
    hmm...i dont know whats wrong...but i do know this....that is one horrible variable name....
    My Website

    "Circular logic is good because it is."

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21